update dev
This commit is contained in:
No files matched your search
+12
-12
@@ -36,20 +36,20 @@ func ConnectDB() {
|
||||
log.Println("Successfully connected to the database")
|
||||
}
|
||||
|
||||
hostSimrs := os.Getenv("SIMRS_HOST")
|
||||
userNameSimrs := os.Getenv("SIMRS_USERNAME")
|
||||
passwordSimrs := os.Getenv("SIMRS_PASSWORD")
|
||||
dbNameSimrs := os.Getenv("SIMRS_NAME")
|
||||
portSimrs := os.Getenv("SIMRS_PORT")
|
||||
// hostSimrs := os.Getenv("SIMRS_HOST")
|
||||
// userNameSimrs := os.Getenv("SIMRS_USERNAME")
|
||||
// passwordSimrs := os.Getenv("SIMRS_PASSWORD")
|
||||
// dbNameSimrs := os.Getenv("SIMRS_NAME")
|
||||
// portSimrs := os.Getenv("SIMRS_PORT")
|
||||
|
||||
simrs := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=disable TimeZone=Asia/Jakarta", hostSimrs, userNameSimrs, passwordSimrs, dbNameSimrs, portSimrs)
|
||||
// simrs := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=disable TimeZone=Asia/Jakarta", hostSimrs, userNameSimrs, passwordSimrs, dbNameSimrs, portSimrs)
|
||||
|
||||
SimrsDB, err = gorm.Open(postgres.Open(simrs), &gorm.Config{})
|
||||
if err != nil {
|
||||
log.Fatal("Failed to connect to Satu Data database: ", err)
|
||||
} else {
|
||||
log.Println("Successfully connected to the database")
|
||||
}
|
||||
// SimrsDB, err = gorm.Open(postgres.Open(simrs), &gorm.Config{})
|
||||
// if err != nil {
|
||||
// log.Fatal("Failed to connect to Satu Data database: ", err)
|
||||
// } else {
|
||||
// log.Println("Successfully connected to the database")
|
||||
// }
|
||||
}
|
||||
|
||||
func SetHeader(isIcare bool, cfg config.ConfigBpjs) *config.Header {
|
||||
|
||||
Reference in New Issue
Block a user