Update api_controller.rb
This commit is contained in:
parent
b08d851341
commit
4e3c628c8d
1 changed files with 1 additions and 2 deletions
|
|
@ -41,7 +41,6 @@ class Api::V1::ApiController < ActionController::API
|
||||||
|
|
||||||
def current_user
|
def current_user
|
||||||
@current_user ||= User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
|
@current_user ||= User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
|
||||||
@current_user.update_last_ip_and_last_seen!(request.remote_ip) if @current_user
|
|
||||||
|
|
||||||
return @current_user
|
return @current_user
|
||||||
end
|
end
|
||||||
|
|
@ -57,7 +56,7 @@ class Api::V1::ApiController < ActionController::API
|
||||||
render 'not_found', status: :not_found
|
render 'not_found', status: :not_found
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_unauthorized_response(exception)
|
def render_unauthorized_response
|
||||||
render action: 'errors', status: :unauthorized
|
render action: 'errors', status: :unauthorized
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue