Return a 403 instead of 200 when trying to delete a user with posts

See [this commit][1] for more info

[1]: bd352a17bf
This commit is contained in:
Blake Erickson
2018-05-22 16:17:44 -06:00
parent 609804f5ef
commit 3edca8b104
2 changed files with 2 additions and 2 deletions

View File

@@ -382,7 +382,7 @@ class Admin::UsersController < Admin::AdminController
render json: {
deleted: false,
message: "User #{user.username} has #{user.post_count} posts, so they can't be deleted."
}
}, status: 403
end
end
end