about summary refs log tree commit diff
path: root/app/services/after_unallow_domain_service.rb
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2020-07-17 14:00:08 -0500
committerStarfall <us@starfall.systems>2020-07-17 14:00:08 -0500
commitc5b7bf491e9aaf0a92f7899d60d12705d98436dc (patch)
tree7506b93ec2c20bf068f2b57c31d0a05e0485aed5 /app/services/after_unallow_domain_service.rb
parent2f20bc2a8275875033c97249825a2a3305980c3b (diff)
parent801e546ecc1efb4103232d8265229eb455a8dd5b (diff)
glitch 3.2.0 update / Merge branch 'glitch' into main
Diffstat (limited to 'app/services/after_unallow_domain_service.rb')
-rw-r--r--app/services/after_unallow_domain_service.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/after_unallow_domain_service.rb b/app/services/after_unallow_domain_service.rb
new file mode 100644
index 000000000..ccd0b8ae9
--- /dev/null
+++ b/app/services/after_unallow_domain_service.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AfterUnallowDomainService < BaseService
+  def call(domain)
+    Account.where(domain: domain).find_each do |account|
+      SuspendAccountService.new.call(account, reserve_username: false)
+    end
+  end
+end