mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-10 03:03:43 +08:00
feat(ui): 403,没权限
This commit is contained in:
@@ -34,3 +34,11 @@ func NotAuth(c *gin.Context, messages ...string) {
|
||||
c.JSON(http.StatusOK, types.BizVo{Code: types.NotAuthorized, Message: "Not Authorized"})
|
||||
}
|
||||
}
|
||||
|
||||
func NotPermission(c *gin.Context, messages ...string) {
|
||||
if messages != nil {
|
||||
c.JSON(http.StatusOK, types.BizVo{Code: types.NotPermission, Message: messages[0]})
|
||||
} else {
|
||||
c.JSON(http.StatusOK, types.BizVo{Code: types.NotPermission, Message: "Not Permission"})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user