]> cat aescling's git repositories - mastodon.git/commitdiff
Fix locale not being set in REST API (#17847)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 22 Mar 2022 11:29:04 +0000 (12:29 +0100)
committerGitHub <noreply@github.com>
Tue, 22 Mar 2022 11:29:04 +0000 (12:29 +0100)
app/controllers/activitypub/base_controller.rb
app/controllers/api/base_controller.rb

index 4cbc3ab8f209ad24fbdb4d8cf7f71ae3c27b71b1..196d85a32643e3ef94edab875067fb6a6975bf50 100644 (file)
@@ -2,6 +2,7 @@
 
 class ActivityPub::BaseController < Api::BaseController
   skip_before_action :require_authenticated_user!
+  skip_around_action :set_locale
 
   private
 
index 72c30dec73e9fcbefa5e9599eb28c8554a8862b9..d96285b440479af50330eab92e9d273ef4dfbcf4 100644 (file)
@@ -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