API v1 user endpoint

This commit is contained in:
wvengen 2018-10-13 15:15:43 +02:00 committed by wvengen
parent fd96b6ccc1
commit 110c7cc3e9
7 changed files with 31 additions and 0 deletions

View file

@ -2,6 +2,8 @@ class Api::V1::BaseController < ApplicationController
protect_from_forgery with: :null_session
before_action :skip_session
before_action :authenticate
rescue_from ActiveRecord::RecordNotFound, with: :not_found_handler
rescue_from ActiveRecord::RecordNotSaved, with: :not_acceptable_handler
rescue_from ActiveRecord::RecordInvalid, with: :not_acceptable_handler

View file

@ -0,0 +1,7 @@
class Api::V1::UsersController < Api::V1::BaseController
def show
render json: current_user
end
end