Class: Api::BaseController

Inherits:
ApplicationController show all
Includes:
DeviseTokenAuth::Concerns::SetUserByToken, ExceptionHandler, RequestHeaderHandler, ResponseHandler
Defined in:
app/controllers/api/base_controller.rb

Direct Known Subclasses

V1::HealthCheckController

Instance Method Summary collapse

Methods included from RequestHeaderHandler

#cloudfront_headers, #device_headers

Methods included from ResponseHandler

#config_default_response_settings, #render_error, #render_no_content, #render_success, #set_response_format

Methods inherited from ApplicationController

#get_search_params

Instance Method Details

#render_authenticate_errorObject



17
18
19
20
21
22
23
# File 'app/controllers/api/base_controller.rb', line 17

def render_authenticate_error
  return render json: {
    errors: { 
      server: [I18n.t('devise.failure.unauthenticated')]
    }
  }, status: 401
end