Skip to content
Snippets Groups Projects
Commit a41d83fe authored by Cseh Viktor's avatar Cseh Viktor
Browse files

Merge branch 'main' into 'Viktor'

# Conflicts:
#   dbHelper/dbController.go
parents 1193bab7 e631727a
No related branches found
No related tags found
1 merge request!2HTML POST processing missing LAB number fixd
......@@ -18,6 +18,7 @@ type PostgresConfig struct {
User string `env:"POSTGRES_USER" envDefault:"postgres"`
Password string `env:"POSTGRES_PASSWORD" envDefault:"postgres"`
Database string `env:"POSTGRES_DB" envDefault:"postgres"`
SSLMode string `env:"SSL_MODE" envDefault:"disable"`
}
var Db *gorm.DB
......@@ -30,7 +31,7 @@ func Dbinit() {
c = validConfig
}
dsn := string("host="+ c.Host + " user=" + c.User + " password=" + c.Password + " port=" + c.Port + " sslmode=disable TimeZone=Europe/Budapest")
dsn := string("host="+ c.Host + " user=" + c.User + " password=" + c.Password + " port=" + c.Port + " sslmode="+ c.SSLMode +" TimeZone=Europe/Budapest")
Db, err = gorm.Open(postgres.Open(dsn), &gorm.Config{})
if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment