feat: update

This commit is contained in:
2025-12-16 15:43:28 +08:00
parent 2974ba1c2c
commit 0531a72ae6
11 changed files with 217 additions and 11 deletions

View File

@@ -5,12 +5,13 @@
package super
import (
"quyun/v2/app/http/super/dto"
"github.com/gofiber/fiber/v3"
log "github.com/sirupsen/logrus"
_ "go.ipao.vip/atom"
_ "go.ipao.vip/atom/contracts"
. "go.ipao.vip/atom/fen"
"quyun/v2/app/http/super/dto"
)
// Routes implements the HttpRoute contract and provides route registration
@@ -21,6 +22,7 @@ type Routes struct {
log *log.Entry `inject:"false"`
// Controller instances
authController *authController
tenant *tenant
}
// Prepare initializes the routes provider with logging configuration.
@@ -44,6 +46,12 @@ func (r *Routes) Register(router fiber.Router) {
r.authController.login,
Body[dto.LoginForm]("form"),
))
// Register routes for controller: tenant
r.log.Debugf("Registering route: Get /super/v1/tenants -> tenant.list")
router.Get("/super/v1/tenants", DataFunc1(
r.tenant.list,
Query[dto.TenantFilter]("filter"),
))
r.log.Info("Successfully registered all routes")
}