mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-29 18:14:09 +00:00
parent
af46584f82
commit
2750a7a0e6
|
@ -131,4 +131,10 @@ class Api::BaseController < ApplicationController
|
|||
def disallow_unauthenticated_api_access?
|
||||
authorized_fetch_mode?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def respond_with_error(code)
|
||||
render json: { error: Rack::Utils::HTTP_STATUS_CODES[code] }, status: code
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue