class Monban::UseCase::Auth::Token::General

Public Instance Methods

create(account_id:) click to toggle source
# File lib/monban/use_case/auth/token/general.rb, line 23
def create(account_id:)
  login = repository.login_type(account_id: account_id)
  case login
  when "full"  then full.create(account_id: account_id)
  when "authy" then authy.create(account_id: account_id)
  else
    error.server_error! "invalid login: #{login} / #{account_id}"
  end
end