Skip to content

Commit 920988f

Browse files
committed
修复 UpdateCasbinApi 方法遗漏的错误处理
1 parent 14014e9 commit 920988f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/service/system/sys_casbin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ func (casbinService *CasbinService) UpdateCasbinApi(oldPath string, newPath stri
8787
"v1": newPath,
8888
"v2": newMethod,
8989
}).Error
90-
e := casbinService.Casbin()
91-
err = e.LoadPolicy()
9290
if err != nil {
9391
return err
9492
}
95-
return err
93+
94+
e := casbinService.Casbin()
95+
return e.LoadPolicy()
9696
}
9797

9898
//@author: [piexlmax](https://github.com/piexlmax)

0 commit comments

Comments
 (0)