perbaikan
This commit is contained in:
@@ -33,7 +33,12 @@ func main() {
|
||||
config.ConnectDB()
|
||||
|
||||
r := gin.Default()
|
||||
|
||||
r.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"*"}, // or specific domains like "http://example.com"
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
|
||||
AllowHeaders: []string{"Origin", "Content-Type"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
scheduler := cron.New()
|
||||
|
||||
defer scheduler.Stop()
|
||||
@@ -64,13 +69,6 @@ func main() {
|
||||
|
||||
go scheduler.Start()
|
||||
|
||||
r.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"*"}, // or specific domains like "http://example.com"
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
|
||||
AllowHeaders: []string{"Origin", "Content-Type"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
|
||||
v1 := r.Group("/api")
|
||||
|
||||
subspesialis := v1.Group("/subspesialis")
|
||||
@@ -92,8 +90,7 @@ func main() {
|
||||
suratKontrol := v1.Group("/suratkontrol")
|
||||
{
|
||||
suratKontrol.GET("/offset/:offset/limit/:limit", suratkontrol.GetDataSurKon)
|
||||
suratKontrol.GET("/idxdaftar/:idxdaftar/tiperawat/:tiper"+
|
||||
"awat", suratkontrol.GetDataSurKonByID)
|
||||
suratKontrol.GET("/idxdaftar/:idxdaftar/tiperawat/:tiperawat", suratkontrol.GetDataSurKonByID)
|
||||
suratKontrol.GET("/noSuratKontrol/:noSuratKontrol", suratkontrol.GetNomorSuratKontrol)
|
||||
suratKontrol.GET("/noSEP/:noSEP", suratkontrol.GetSuratKontrolBySEP)
|
||||
suratKontrol.GET("/printSurKon/:idxdaftar/tiperawat/:tiperawat", suratkontrol.PrintSurKon)
|
||||
|
||||
Reference in New Issue
Block a user