Refactor API JSON filter
This commit is contained in:
1 parent
3cb48b524b
commit
fe22556f93
1 file changed
+2
-3
@@ -37,9 +37,8 @@ module API
|
||||
end
|
||||
|
||||
def json_filter!
|
||||
if request.format != :json
|
||||
head :not_acceptable, content_type: 'application/json'
|
||||
end
|
||||
return if request.format.json?
|
||||
head :not_acceptable, content_type: 'application/json'
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user