Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-08-23 14:23:41 +0300
committerDouwe Maan <douwe@selenight.nl>2017-09-26 18:31:47 +0300
commit711bb2856884161c5026964292c87984ba78b05c (patch)
treeac9ae82a9433940c34a51e49c6ca570558132031 /app/controllers/projects/tree_controller.rb
parent923ad9a9e2ffca550a06d0cbbd89ac6f276c4605 (diff)
Add Page-Title header to tree and blob JSON endpoints
Diffstat (limited to 'app/controllers/projects/tree_controller.rb')
-rw-r--r--app/controllers/projects/tree_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb
index f3784f4e07c..f3719059f88 100644
--- a/app/controllers/projects/tree_controller.rb
+++ b/app/controllers/projects/tree_controller.rb
@@ -35,6 +35,8 @@ class Projects::TreeController < Projects::ApplicationController
end
format.json do
+ page_title @path.presence || _("Files"), @ref, @project.name_with_namespace
+
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/38261
Gitlab::GitalyClient.allow_n_plus_1_calls do
render json: TreeSerializer.new(project: @project, repository: @repository, ref: @ref).represent(@tree)