mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 11:12:23 +08:00
17 lines
313 B
Ruby
17 lines
313 B
Ruby
class UserAuthTokenLogSerializer < ApplicationSerializer
|
|
include UserAuthTokensMixin
|
|
|
|
attributes :action
|
|
|
|
def action
|
|
case object.action
|
|
when 'generate'
|
|
I18n.t('log_in')
|
|
when 'destroy'
|
|
I18n.t('unsubscribe.log_out')
|
|
else
|
|
I18n.t('staff_action_logs.unknown')
|
|
end
|
|
end
|
|
end
|