Use use case for `User#unban`
This commit is contained in:
parent
0659ff1f9a
commit
a9392dad53
|
@ -228,7 +228,7 @@ class User < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def unban
|
def unban
|
||||||
self.bans.current.update!(expires_at: DateTime.now)
|
UseCase::User::Unban.call(id)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Bans a user.
|
# Bans a user.
|
||||||
|
|
Loading…
Reference in New Issue