mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-10 19:23:42 +08:00
feat(ui): 后端加权限验证
This commit is contained in:
@@ -68,6 +68,11 @@ func (h *ApiKeyHandler) Save(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (h *ApiKeyHandler) List(c *gin.Context) {
|
||||
if err := utils.CheckPermission(c, h.db); err != nil {
|
||||
resp.ERROR(c, types.NoPermission)
|
||||
return
|
||||
}
|
||||
|
||||
var items []model.ApiKey
|
||||
var keys = make([]vo.ApiKey, 0)
|
||||
res := h.db.Find(&items)
|
||||
|
||||
Reference in New Issue
Block a user