Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed May 8, 2022
1 parent e12047e commit b5facd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions routers/api/v1/admin/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ func DeleteUser(ctx *context.APIContext) {
return
}

// admin should not delete himself
// admin should not delete themself
if ctx.ContextUser.ID == ctx.Doer.ID {
ctx.Error(http.StatusUnprocessableEntity, "", fmt.Errorf("You cannot delete yourself"))
ctx.Error(http.StatusUnprocessableEntity, "", fmt.Errorf("you cannot delete yourself"))
return
}

Expand Down
2 changes: 1 addition & 1 deletion routers/web/admin/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func DeleteUser(ctx *context.Context) {
return
}

// admin should not delete himself
// admin should not delete themself
if u.ID == ctx.Doer.ID {
ctx.Flash.Error(ctx.Tr("admin.users.cannot_delete_self"))
ctx.JSON(http.StatusOK, map[string]interface{}{
Expand Down

0 comments on commit b5facd0

Please sign in to comment.