标签更新
This commit is contained in:
@@ -16,42 +16,42 @@ func registerPermissionRoutes(api fiber.Router, h *admin.PermissionHandler, doc
|
||||
// 权限 CRUD
|
||||
Register(permissions, doc, groupPath, "POST", "", h.Create, RouteSpec{
|
||||
Summary: "创建权限",
|
||||
Tags: []string{"Permission"},
|
||||
Tags: []string{"权限"},
|
||||
Input: new(model.CreatePermissionRequest),
|
||||
Output: new(model.PermissionResponse),
|
||||
})
|
||||
|
||||
Register(permissions, doc, groupPath, "GET", "", h.List, RouteSpec{
|
||||
Summary: "权限列表",
|
||||
Tags: []string{"Permission"},
|
||||
Tags: []string{"权限"},
|
||||
Input: new(model.PermissionListRequest),
|
||||
Output: new(model.PermissionPageResult),
|
||||
})
|
||||
|
||||
Register(permissions, doc, groupPath, "GET", "/tree", h.GetTree, RouteSpec{
|
||||
Summary: "获取权限树",
|
||||
Tags: []string{"Permission"},
|
||||
Tags: []string{"权限"},
|
||||
Input: nil, // 无参数或 Query 参数
|
||||
Output: new([]*model.PermissionTreeNode),
|
||||
})
|
||||
|
||||
Register(permissions, doc, groupPath, "GET", "/:id", h.Get, RouteSpec{
|
||||
Summary: "获取权限详情",
|
||||
Tags: []string{"Permission"},
|
||||
Tags: []string{"权限"},
|
||||
Input: new(model.IDReq),
|
||||
Output: new(model.PermissionResponse),
|
||||
})
|
||||
|
||||
Register(permissions, doc, groupPath, "PUT", "/:id", h.Update, RouteSpec{
|
||||
Summary: "更新权限",
|
||||
Tags: []string{"Permission"},
|
||||
Tags: []string{"权限"},
|
||||
Input: new(model.UpdatePermissionParams),
|
||||
Output: new(model.PermissionResponse),
|
||||
})
|
||||
|
||||
Register(permissions, doc, groupPath, "DELETE", "/:id", h.Delete, RouteSpec{
|
||||
Summary: "删除权限",
|
||||
Tags: []string{"Permission"},
|
||||
Tags: []string{"权限"},
|
||||
Input: new(model.IDReq),
|
||||
Output: nil,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user