about summary refs log tree commit diff
path: root/app/controllers/admin/accounts_controller.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-12-07 09:03:42 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-12-07 09:03:42 +0100
commit9a3d91f629ae0e8f722d56b8634bfad299ab9f04 (patch)
tree324a2b04d34049d7f31a041d6a44b23d45a46e6b /app/controllers/admin/accounts_controller.rb
parentfe523a304520a09f6371f45bd63b9e8988776c03 (diff)
parentb59fb28e90bc21d6fd1a6bafd13cfbd81ab5be54 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/concerns/domain_materializable.rb`:
  Fixed a code style issue upstream in a PR that got merged in glitch-soc
  earlier.
  Changed the code to match upstream's.
Diffstat (limited to 'app/controllers/admin/accounts_controller.rb')
-rw-r--r--app/controllers/admin/accounts_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb
index 40bf685c5..9beb8fde6 100644
--- a/app/controllers/admin/accounts_controller.rb
+++ b/app/controllers/admin/accounts_controller.rb
@@ -55,12 +55,14 @@ module Admin
     def approve
       authorize @account.user, :approve?
       @account.user.approve!
+      log_action :approve, @account.user
       redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.approved_msg', username: @account.acct)
     end
 
     def reject
       authorize @account.user, :reject?
       DeleteAccountService.new.call(@account, reserve_email: false, reserve_username: false)
+      log_action :reject, @account.user
       redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.rejected_msg', username: @account.acct)
     end