少提交的东西
This commit is contained in:
@@ -9,21 +9,13 @@ import (
|
||||
// RegisterRoutes 路由注册总入口
|
||||
// 按业务模块调用各自的路由注册函数
|
||||
func RegisterRoutes(app *fiber.App, handlers *bootstrap.Handlers) {
|
||||
// API 路由组
|
||||
api := app.Group("/api/v1")
|
||||
|
||||
// 注册各模块路由
|
||||
// 1. 全局路由
|
||||
registerHealthRoutes(app)
|
||||
registerTaskRoutes(api)
|
||||
|
||||
// RBAC 路由
|
||||
if handlers.Account != nil {
|
||||
registerAccountRoutes(api, handlers.Account)
|
||||
}
|
||||
if handlers.Role != nil {
|
||||
registerRoleRoutes(api, handlers.Role)
|
||||
}
|
||||
if handlers.Permission != nil {
|
||||
registerPermissionRoutes(api, handlers.Permission)
|
||||
}
|
||||
// 2. Admin 域 (挂载在 /api/admin)
|
||||
adminGroup := app.Group("/api/admin")
|
||||
RegisterAdminRoutes(adminGroup, handlers, nil, "/api/admin")
|
||||
|
||||
// 任务相关路由 (归属于 Admin 域)
|
||||
registerTaskRoutes(adminGroup)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user