Fix /api/v1/admin/accounts (#17887)
* Fix /api/v1/admin/accounts Compatibility was broken since #17009 which changed the underlying filter class without changing the controller. This commits restore support for the old parameters. * Add /api/v2/admin/accounts with the new parameters * Add tests * Add missing filter for `silenced` status Co-authored-by: Eugen Rochko <eugen@zeonfederated.com> Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
This commit is contained in:
parent
22eeaf2645
commit
894956e20c
6 changed files with 159 additions and 4 deletions
|
@ -80,6 +80,10 @@ class AccountFilter
|
|||
accounts_with_users.merge(User.pending)
|
||||
when 'suspended'
|
||||
Account.suspended
|
||||
when 'disabled'
|
||||
accounts_with_users.merge(User.disabled)
|
||||
when 'silenced'
|
||||
Account.silenced
|
||||
else
|
||||
raise "Unknown status: #{value}"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue