fix: update SSL mode configuration in debug.yaml and NewDB function

This commit is contained in:
Ardeman
2025-04-23 13:11:57 +08:00
parent 6f1ac37915
commit a7ef3f8ca2
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -15,12 +15,13 @@ type DB struct {
func NewDB(cfg *config.Config) (*DB, error) {
dsn := fmt.Sprintf(
"host=%s user=%s password=%s dbname=%s port=%v sslmode=disable",
"host=%s user=%s password=%s dbname=%s port=%v sslmode=%s",
cfg.Database.Host,
cfg.Database.Username,
cfg.Database.Password,
cfg.Database.DB,
cfg.Database.Port,
cfg.Database.SslMode,
)
if dsn == "" {