Refine rules definition

This commit is contained in:
hongming
2018-06-11 10:38:15 +08:00
parent 1e744d0ad3
commit 54576548be
3 changed files with 144 additions and 67 deletions

View File

@@ -71,6 +71,13 @@ func delUser(req *restful.Request, resp *restful.Response) {
return
}
err = models.DeleteRoleBindings(user)
if err != nil {
resp.WriteHeaderAndEntity(http.StatusInternalServerError, constants.MessageResponse{Message: err.Error()})
return
}
resp.WriteEntity(constants.MessageResponse{Message: "successfully deleted"})
}