diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-15 00:22:58 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-15 00:22:58 +0100 |
commit | 5426f06ac29b9ef4d302d3f2d13b315dcf89e079 (patch) | |
tree | d4a3c2b1e5cefc544748e46ed34471a3da345a14 /app/controllers | |
parent | 0a2427f79b90f82100b3a4ebe95ceb488cbb5a1d (diff) |
Fix admin UI for accounts somewhat
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/accounts_controller.rb | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index 95107b3dc..df2c7bebf 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -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 |