Skip to content

Commit

Permalink
[fixed] 优化错误判断 (#1762)
Browse files Browse the repository at this point in the history
  • Loading branch information
DG9Jww authored Jun 7, 2024
1 parent 21266be commit f773a02
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/service/system/sys_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ func (apiService *ApiService) DeleteApi(api system.SysApi) (err error) {
if err != nil {
return err
}
CasbinServiceApp.ClearCasbin(1, entity.Path, entity.Method)
if err != nil {
return err
if !CasbinServiceApp.ClearCasbin(1, entity.Path, entity.Method) {
return errors.New("ClearCasbin 失败")
}
return nil
}
Expand Down

0 comments on commit f773a02

Please sign in to comment.