Skip to content

Commit 876b8aa

Browse files
authored
Update sys_authority_btn.go (flipped-aurora#1386)
增加 err 错误处理
1 parent 40f77db commit 876b8aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/api/v1/system/sys_authority_btn.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ type AuthorityBtnApi struct{}
2222
func (a *AuthorityBtnApi) GetAuthorityBtn(c *gin.Context) {
2323
var req request.SysAuthorityBtnReq
2424
err := c.ShouldBindJSON(&req)
25+
if err != nil {
26+
response.FailWithMessage(err.Error(), c)
27+
return
28+
}
2529
res, err := authorityBtnService.GetAuthorityBtn(req)
2630
if err != nil {
2731
global.GVA_LOG.Error("查询失败!", zap.Error(err))

0 commit comments

Comments
 (0)