Merge pull request 'Add Infra' (#1) from feature-test into main

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2025-03-03 12:03:19 +00:00
1782 changed files with 692894 additions and 21 deletions
+6 -6
View File
@@ -13,14 +13,14 @@ type DB struct {
*gorm.DB
}
func NewDB() (*DB, error) {
func NewDB(cfg *config.Config) (*DB, error) {
dsn := fmt.Sprintf(
"host=%s user=%s password=%s dbname=%s port=%v sslmode=disable",
config.DB_HOST,
config.DB_USER,
config.DB_PASSWORD,
config.DB_NAME,
config.DB_PORT,
cfg.Database.Host,
cfg.Database.Username,
cfg.Database.Password,
cfg.Database.DB,
cfg.Database.Port,
)
if dsn == "" {