Fix admin UI for accounts somewhat
This commit is contained in:
parent
0a2427f79b
commit
5426f06ac2
5 changed files with 58 additions and 31 deletions
|
@ -19,19 +19,26 @@ class Admin::AccountsController < ApplicationController
|
|||
|
||||
def show; end
|
||||
|
||||
def update
|
||||
if @account.update(account_params)
|
||||
redirect_to admin_accounts_path
|
||||
else
|
||||
render :show
|
||||
end
|
||||
end
|
||||
|
||||
def suspend
|
||||
Admin::SuspensionWorker.perform_async(@account.id)
|
||||
redirect_to admin_accounts_path
|
||||
end
|
||||
|
||||
def unsuspend
|
||||
@account.update(suspended: false)
|
||||
redirect_to admin_accounts_path
|
||||
end
|
||||
|
||||
def silence
|
||||
@account.update(silenced: true)
|
||||
redirect_to admin_accounts_path
|
||||
end
|
||||
|
||||
def unsilence
|
||||
@account.update(silenced: false)
|
||||
redirect_to admin_accounts_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue