Files
junhong_cmp_fiber/internal/routes/admin.go
2026-01-06 11:07:29 +08:00

23 lines
659 B
Go

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?
}