diff options
author | Rémy Coutable <remy@rymai.me> | 2019-05-07 17:52:04 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-05-07 17:52:04 +0300 |
commit | ed823c356f3875bf499b12aef29d3fe061b5a666 (patch) | |
tree | cb81aa2d51bb859da25f27089bb27a75ed367f3c /lib | |
parent | 5c07f932bb7f99f231d83351e9a0f500d98074a2 (diff) | |
parent | 58c09eb70941a0954fb5cd7b0c6316c698353edb (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.rb | 4 |
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) |