ci: support husky

feat: fix lint issues
This commit is contained in:
yanghao05
2023-03-07 19:07:31 +08:00
parent bfe1870420
commit 8d1bd191df
5 changed files with 42 additions and 8 deletions

View File

@@ -36,7 +36,7 @@ func CheckPermission(config *config.Config, rbac rbac.IRbac) gin.HandlerFunc {
// 获取用户的角色
role := strconv.Itoa(int(claims.Role))
if rbac.Can(role, method, path) == false {
if !rbac.Can(role, method, path) {
gen.NewBusError(http.StatusForbidden, http.StatusForbidden, "未登录或非法访问").JSON(c, false)
c.Abort()
return