Browse Source

修复自杀操作bug

main
SliverHorn 4 years ago
parent
commit
28df45b292
  1. 5
      server/api/v1/sys_user.go

5
server/api/v1/sys_user.go

@ -216,6 +216,11 @@ func DeleteUser(c *gin.Context) {
response.FailWithMessage(err.Error(), c)
return
}
jwtId := getUserID(c)
if jwtId == uint(reqId.Id) {
response.FailWithMessage("删除失败, 自杀失败", c)
return
}
if err := service.DeleteUser(reqId.Id); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)

Loading…
Cancel
Save