package logs import ( "github.com/Caknoooo/go-gin-clean-starter/modules/logs/controller" // userService "github.com/Caknoooo/go-gin-clean-starter/modules/user/service" "github.com/gin-gonic/gin" "github.com/samber/do" ) func RegisterRoutes(server *gin.Engine, injector *do.Injector) { logsController := do.MustInvoke[controller.LogsController](injector) // userService := do.MustInvoke[userService.UserService](injector) // PROTECTED ROUTES - untuk admin panel (dengan auth) server.GET("/admin/logs", logsController.ServeLogsPage) protectedLogs := server.Group("/api/v1/logs") // jwt // protectedLogs.Use(middlewares.RoleSuperAdmin(userService)) { protectedLogs.GET("", logsController.GetLogs) protectedLogs.GET("/:month", logsController.GetLogsByMonth) } }