API v1 user endpoint
This commit is contained in:
parent
fd96b6ccc1
commit
110c7cc3e9
7 changed files with 31 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
7
app/controllers/api/v1/users_controller.rb
Normal file
7
app/controllers/api/v1/users_controller.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class Api::V1::UsersController < Api::V1::BaseController
|
||||
|
||||
def show
|
||||
render json: current_user
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue