Class: Tramway::Api::V1::UserTokensController

Inherits:
ApplicationController show all
Includes:
AuthenticateHelper
Defined in:
app/controllers/tramway/api/v1/user_tokens_controller.rb

Instance Method Summary collapse

Methods included from AuthenticateHelper

#auth_params, #auth_token, #authenticate, #entity

Instance Method Details

#create ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'app/controllers/tramway/api/v1/user_tokens_controller.rb', line 8

def create
  token = auth_token
  render json: {
    auth_token: token,
    user: {
      email: @entity.email
    }
  }, status: :created
end