mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Merge commit 'ec2023233d3e7cae1aba5aa1bdce0e6d72437101' into glitch-soc/backports-4.3
This commit is contained in:
@@ -72,6 +72,13 @@ class Api::BaseController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# Redefine `require_functional!` to properly output JSON instead of HTML redirects
|
||||
def require_functional!
|
||||
return if current_user.functional?
|
||||
|
||||
require_user!
|
||||
end
|
||||
|
||||
def render_empty
|
||||
render json: {}, status: 200
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user