Fixed wrong call of translation method in ban action

This commit is contained in:
Andreas Nedbal 2022-09-03 16:42:17 +02:00
parent 918c514f12
commit 6a083230dd

View file

@ -59,7 +59,7 @@ class Ajax::ModerationController < AjaxController
raise Errors::InvalidBanDuration unless %w[hours days weeks months].include? duration_unit
expiry = DateTime.now + duration.public_send(duration_unit)
@response[:message] = I18n.t(".success.temporary", date: expiry.to_s)
@response[:message] = t(".success.temporary", date: expiry.to_s)
end
UseCase::User::Ban.call(