少提交的东西
This commit is contained in:
22
internal/routes/admin.go
Normal file
22
internal/routes/admin.go
Normal 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?
|
||||
}
|
||||
Reference in New Issue
Block a user