feat: 重构认证控制器,统一类型命名为auth

This commit is contained in:
2025-12-17 16:22:10 +08:00
parent fe9601baf4
commit 70c9094001
3 changed files with 14 additions and 14 deletions

View File

@@ -20,9 +20,9 @@ import (
type Routes struct {
log *log.Entry `inject:"false"`
// Controller instances
authController *authController
tenant *tenant
user *user
auth *auth
tenant *tenant
user *user
}
// Prepare initializes the routes provider with logging configuration.
@@ -40,10 +40,10 @@ func (r *Routes) Name() string {
// Register registers all HTTP routes with the provided fiber router.
// Each route is registered with its corresponding controller action and parameter bindings.
func (r *Routes) Register(router fiber.Router) {
// Register routes for controller: authController
r.log.Debugf("Registering route: Post /super/v1/auth/login -> authController.login")
// Register routes for controller: auth
r.log.Debugf("Registering route: Post /super/v1/auth/login -> auth.login")
router.Post("/super/v1/auth/login", DataFunc1(
r.authController.login,
r.auth.login,
Body[dto.LoginForm]("form"),
))
// Register routes for controller: tenant