feat: add static file serving and refactor route registration

This commit is contained in:
2025-12-16 22:40:31 +08:00
parent 55c40c4601
commit 2a12e1c3a9
7 changed files with 41 additions and 21 deletions

View File

@@ -17,12 +17,13 @@ import (
// Routes implements the HttpRoute contract and provides route registration
// for all controllers in the super module.
//
// @provider contracts.HttpRoute atom.GroupRoutes
// @provider contracts.HttpRoute atom.GroupRoutes
type Routes struct {
log *log.Entry `inject:"false"`
// Controller instances
authController *authController
tenant *tenant
authController *authController
staticController *staticController
tenant *tenant
}
// Prepare initializes the routes provider with logging configuration.
@@ -59,5 +60,7 @@ func (r *Routes) Register(router fiber.Router) {
Body[dto.TenantExpireUpdateForm]("form"),
))
router.Get("/super/*", Func(r.staticController.static))
r.log.Info("Successfully registered all routes")
}