Refactor API JSON filter
This commit is contained in:
@@ -37,9 +37,8 @@ module API
|
|||||||
end
|
end
|
||||||
|
|
||||||
def json_filter!
|
def json_filter!
|
||||||
if request.format != :json
|
return if request.format.json?
|
||||||
head :not_acceptable, content_type: 'application/json'
|
head :not_acceptable, content_type: 'application/json'
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user