Fix locale not being set in REST API (#17847)

local
Eugen Rochko 2 years ago committed by GitHub
parent 410989e081
commit 67d550830b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/controllers/activitypub/base_controller.rb
  2. 2
      app/controllers/api/base_controller.rb

@ -2,6 +2,7 @@
class ActivityPub::BaseController < Api::BaseController
skip_before_action :require_authenticated_user!
skip_around_action :set_locale
private

@ -15,8 +15,6 @@ class Api::BaseController < ApplicationController
protect_from_forgery with: :null_session
skip_around_action :set_locale
rescue_from ActiveRecord::RecordInvalid, Mastodon::ValidationError do |e|
render json: { error: e.to_s }, status: 422
end

Loading…
Cancel
Save