about summary refs log tree commit diff
path: root/app/services/defederate_domain_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/defederate_domain_service.rb')
-rw-r--r--app/services/defederate_domain_service.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/defederate_domain_service.rb b/app/services/defederate_domain_service.rb
new file mode 100644
index 000000000..d40f88e3f
--- /dev/null
+++ b/app/services/defederate_domain_service.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class DefederateDomainService < BaseService
+  def call(domains)
+    return if domains.blank?
+
+    Account.local.find_each do |account|
+      DefederateAccountService.new.call(account, domains)
+    end
+  end
+end