少提交的东西

This commit is contained in:
2026-01-06 11:07:29 +08:00
parent 2d566a9820
commit 4df3c12328
10 changed files with 328 additions and 100 deletions

22
internal/routes/admin.go Normal file
View File

@@ -0,0 +1,22 @@
package routes
import (
"github.com/gofiber/fiber/v2"
"github.com/break/junhong_cmp_fiber/internal/bootstrap"
"github.com/break/junhong_cmp_fiber/pkg/openapi"
)
// RegisterAdminRoutes 注册管理后台相关路由
func RegisterAdminRoutes(router fiber.Router, handlers *bootstrap.Handlers, doc *openapi.Generator, basePath string) {
if handlers.Account != nil {
registerAccountRoutes(router, handlers.Account, doc, basePath)
}
if handlers.Role != nil {
registerRoleRoutes(router, handlers.Role, doc, basePath)
}
if handlers.Permission != nil {
registerPermissionRoutes(router, handlers.Permission, doc, basePath)
}
// TODO: Task routes?
}