2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-09-02 22:44:22 -04:00
|
|
|
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
|