update dev

This commit is contained in:
2025-04-25 14:43:13 +07:00
parent be13b428f1
commit dfdf5c887d
5 changed files with 26 additions and 26 deletions

No files matched your search

+12 -12
View File
@@ -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 {