changed property name to UserWasDeleted and added an assert for it

This commit is contained in:
Torkel Ödegaard
2018-10-11 12:20:53 -07:00
parent 9585dc7825
commit b671b9704f
4 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -103,8 +103,8 @@ func updateOrgUserHelper(cmd m.UpdateOrgUserCommand) Response {
// DELETE /api/org/users/:userId
func RemoveOrgUserForCurrentOrg(c *m.ReqContext) Response {
return removeOrgUserHelper(&m.RemoveOrgUserCommand{
UserId: c.ParamsInt64(":userId"),
OrgId: c.OrgId,
UserId: c.ParamsInt64(":userId"),
OrgId: c.OrgId,
ShouldDeleteOrphanedUser: true,
})
}
@@ -125,7 +125,7 @@ func removeOrgUserHelper(cmd *m.RemoveOrgUserCommand) Response {
return Error(500, "Failed to remove user from organization", err)
}
if cmd.UserWasRemoved {
if cmd.UserWasDeleted {
return Success("User deleted")
}