From 7f803c41e2ca54b7b787b1f111f91357136c0e68 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 17 Dec 2021 23:01:21 +0100 Subject: Add ability to purge undeliverable domains from admin interface (#16686) * Add ability to purge undeliverable domains from admin interface * Add tests --- app/controllers/admin/instances_controller.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/controllers/admin') diff --git a/app/controllers/admin/instances_controller.rb b/app/controllers/admin/instances_controller.rb index 748c5de5a..306ec1f53 100644 --- a/app/controllers/admin/instances_controller.rb +++ b/app/controllers/admin/instances_controller.rb @@ -14,6 +14,15 @@ module Admin authorize :instance, :show? end + def destroy + authorize :instance, :destroy? + + Admin::DomainPurgeWorker.perform_async(@instance.domain) + + log_action :destroy, @instance + redirect_to admin_instances_path, notice: I18n.t('admin.instances.destroyed_msg', domain: @instance.domain) + end + def clear_delivery_errors authorize :delivery, :clear_delivery_errors? -- cgit