users: set is_deleted flag when account is deleted.

* Set the `is_deleted` flag when the user is deleted.
* Return the `is_deleted` flag in the /users.json API.
This commit is contained in:
evazion
2022-11-06 13:04:05 -06:00
parent 0a78a6188d
commit 6f08e1427b
5 changed files with 20 additions and 9 deletions

View File

@@ -65,7 +65,7 @@ class UserPolicy < ApplicationPolicy
def api_attributes
attributes = %i[
id created_at name inviter_id level level_string
post_upload_count post_update_count note_update_count is_banned
post_upload_count post_update_count note_update_count is_banned is_deleted
]
if record.id == user.id