From 4e3c628c8d40f1e166ca4f427f8ab019c7336240 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 26 Sep 2020 10:51:17 -0700 Subject: [PATCH] Update api_controller.rb --- app/controllers/api/v1/api_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/v1/api_controller.rb b/app/controllers/api/v1/api_controller.rb index f2d62a5..871acbf 100644 --- a/app/controllers/api/v1/api_controller.rb +++ b/app/controllers/api/v1/api_controller.rb @@ -41,7 +41,6 @@ class Api::V1::ApiController < ActionController::API def current_user @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 end @@ -57,7 +56,7 @@ class Api::V1::ApiController < ActionController::API render 'not_found', status: :not_found end - def render_unauthorized_response(exception) + def render_unauthorized_response render action: 'errors', status: :unauthorized end