Skip to content

Commit 1b9e74e

Browse files
committed
fixed config
1 parent 25d2bc9 commit 1b9e74e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func LoadConfig() (*Config, error) {
118118
cfg.DBPort,
119119
cfg.DBName,
120120
)
121-
case "postgres":
121+
case "postgres", "pgsql":
122122
cfg.DbURL = fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=disable TimeZone=Africa/Nairobi",
123123
cfg.DBHost,
124124
cfg.DBUser,
@@ -149,7 +149,7 @@ func ConnectDB() (*gorm.DB, error) {
149149
switch cfg.DBDriver {
150150
case "mysql":
151151
gormDB, err = gorm.Open(mysql.Open(cfg.DbURL), &gorm.Config{})
152-
case "postgres":
152+
case "postgres", "pgsql":
153153
gormDB, err = gorm.Open(postgres.Open(cfg.DbURL), &gorm.Config{})
154154

155155
case "sqlite":

0 commit comments

Comments
 (0)