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
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-05-07 17:52:04 +0300
committerRémy Coutable <remy@rymai.me>2019-05-07 17:52:04 +0300
commited823c356f3875bf499b12aef29d3fe061b5a666 (patch)
treecb81aa2d51bb859da25f27089bb27a75ed367f3c /lib
parent5c07f932bb7f99f231d83351e9a0f500d98074a2 (diff)
parent58c09eb70941a0954fb5cd7b0c6316c698353edb (diff)
Merge branch 'sh-fix-related-merge-requests-path' into 'master'
Use a path for the related merge requests endpoint Closes #61280 See merge request gitlab-org/gitlab-ce!28171
Diffstat (limited to 'lib')
-rw-r--r--lib/api/helpers/related_resources_helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers/related_resources_helpers.rb b/lib/api/helpers/related_resources_helpers.rb
index 793ae11b41d..9cdde25fe4e 100644
--- a/lib/api/helpers/related_resources_helpers.rb
+++ b/lib/api/helpers/related_resources_helpers.rb
@@ -13,6 +13,10 @@ module API
available?(:merge_requests, project, options[:current_user])
end
+ def expose_path(path)
+ Gitlab::Utils.append_path(Gitlab.config.gitlab.relative_url_root, path)
+ end
+
def expose_url(path)
url_options = Gitlab::Application.routes.default_url_options
protocol, host, port, script_name = url_options.values_at(:protocol, :host, :port, :script_name)