parent
51289c8472
commit
534077cea2
1 changed files with 6 additions and 0 deletions
|
@ -131,4 +131,10 @@ class Api::BaseController < ApplicationController
|
||||||
def disallow_unauthenticated_api_access?
|
def disallow_unauthenticated_api_access?
|
||||||
authorized_fetch_mode?
|
authorized_fetch_mode?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def respond_with_error(code)
|
||||||
|
render json: { error: Rack::Utils::HTTP_STATUS_CODES[code] }, status: code
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue