Perbaikan SEP

This commit is contained in:
2025-08-20 04:29:48 +07:00
parent bbecb299a5
commit 773b6589bc
8 changed files with 576 additions and 128 deletions

View File

@@ -53,8 +53,8 @@ func RegisterRoutes(cfg *config.Config) *gin.Engine {
v1.POST("/token/generate-direct", tokenHandler.GenerateTokenDirect)
// BPJS endpoints
// bpjsPesertaHandler := bpjsPesertaHandlers.NewPesertaHandler(cfg.Bpjs)
// v1.GET("/bpjs/peserta/nik/:nik/tglSEP/:tglSEP", bpjsPesertaHandler.GetPesertaByNIK)
bpjsPesertaHandler := bpjsPesertaHandlers.NewPesertaHandler(cfg.Bpjs)
v1.GET("/bpjs/peserta/nik/:nik/tglSEP/:tglSEP", bpjsPesertaHandler.GetPesertaByNIK)
// =============================================================================
// PROTECTED ROUTES (Authentication Required)
@@ -79,11 +79,11 @@ func RegisterRoutes(cfg *config.Config) *gin.Engine {
}
// BPJS endpoints (sensitive data - should be protected)
bpjsPesertaHandler := bpjsPesertaHandlers.NewPesertaHandler(cfg.Bpjs)
protectedBpjs := protected.Group("/bpjs")
{
protectedBpjs.GET("/peserta/nik/:nik/tglsep/:tglSEP", bpjsPesertaHandler.GetPesertaByNIK)
}
// bpjsPesertaHandler := bpjsPesertaHandlers.NewPesertaHandler(cfg.Bpjs)
// protectedBpjs := protected.Group("/bpjs")
// {
// protectedBpjs.GET("/peserta/nik/:nik/tglSEP/:tglSEP", bpjsPesertaHandler.GetPesertaByNIK)
// }
return router
}