summaryrefslogtreecommitdiff
path: root/lib/api/api.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index ae10da2d85f..982a2b88d62 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -48,8 +48,8 @@ module API
end
before { header['X-Frame-Options'] = 'SAMEORIGIN' }
- before { Gitlab::I18n.locale = current_user&.preferred_language }
+ # The locale is set to the current user's locale when `current_user` is loaded
after { Gitlab::I18n.use_default_locale }
rescue_from Gitlab::Access::AccessDeniedError do
@@ -123,6 +123,7 @@ module API
mount ::API::ProjectHooks
mount ::API::Projects
mount ::API::ProjectSnippets
+ mount ::API::ProtectedBranches
mount ::API::Repositories
mount ::API::Runner
mount ::API::Runners