diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-22 09:54:53 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-22 09:54:53 +0000 |
commit | 879ddf727de37475d8c3b692378fd3a0e175db58 (patch) | |
tree | fdd8ffe0d1216bcf53dd0d55255b59ad57ef3594 /app/controllers | |
parent | 8f159d9254c6a11cc1ec3f303c3fd2904b2e2cf6 (diff) | |
parent | 14032b8a85f42c89d86925c47bd3e10270779a46 (diff) | |
download | gitlab-ce-879ddf727de37475d8c3b692378fd3a0e175db58.tar.gz |
Merge branch 'fj-46411-fix-badge-api-endpoint-route-with-relative-url' into 'master'
Fixed badge api endpoint route when relative_url is set
Closes #46411
See merge request gitlab-org/gitlab-ce!19004
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/groups/settings/badges_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/projects/settings/badges_controller.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/groups/settings/badges_controller.rb b/app/controllers/groups/settings/badges_controller.rb index edb334a3d88..ccbd0a3bc02 100644 --- a/app/controllers/groups/settings/badges_controller.rb +++ b/app/controllers/groups/settings/badges_controller.rb @@ -1,12 +1,12 @@ module Groups module Settings class BadgesController < Groups::ApplicationController - include GrapeRouteHelpers::NamedRouteMatcher + include API::Helpers::RelatedResourcesHelpers before_action :authorize_admin_group! def index - @badge_api_endpoint = api_v4_groups_badges_path(id: @group.id) + @badge_api_endpoint = expose_url(api_v4_groups_badges_path(id: @group.id)) end end end diff --git a/app/controllers/projects/settings/badges_controller.rb b/app/controllers/projects/settings/badges_controller.rb index f7b70dd4b7b..7887bee49c5 100644 --- a/app/controllers/projects/settings/badges_controller.rb +++ b/app/controllers/projects/settings/badges_controller.rb @@ -1,12 +1,12 @@ module Projects module Settings class BadgesController < Projects::ApplicationController - include GrapeRouteHelpers::NamedRouteMatcher + include API::Helpers::RelatedResourcesHelpers before_action :authorize_admin_project! def index - @badge_api_endpoint = api_v4_projects_badges_path(id: @project.id) + @badge_api_endpoint = expose_url(api_v4_projects_badges_path(id: @project.id)) end end end |