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

@@ -88,6 +88,7 @@ class User < ApplicationRecord
attribute :theme, default: :auto
attribute :upload_points, default: Danbooru.config.initial_upload_points.to_i
attribute :bit_prefs, default: 0
attribute :is_deleted, default: false
has_bit_flags BOOLEAN_ATTRIBUTES, :field => "bit_prefs"
enum theme: { auto: 0, light: 50, dark: 100 }, _suffix: true