fix syntax error

This commit is contained in:
r888888888
2016-01-03 12:41:59 -08:00
parent 5eba09f308
commit 7efeb5829d
2 changed files with 8 additions and 2 deletions

View File

@@ -21,6 +21,13 @@ protected
def enable_cors
response.headers["Access-Control-Allow-Origin"] = "*"
end
def require_shared_key
unless params[:key] == Danbooru.config.shared_remote_key
render(text: "forbidden", status: 403)
return false
end
end
def api_check
if request.format.to_s =~ /\/json|\/xml/ || params[:controller] == "iqdb"