summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-05-22 09:54:53 +0000
committerDouwe Maan <douwe@gitlab.com>2018-05-22 09:54:53 +0000
commit879ddf727de37475d8c3b692378fd3a0e175db58 (patch)
treefdd8ffe0d1216bcf53dd0d55255b59ad57ef3594 /app/controllers
parent8f159d9254c6a11cc1ec3f303c3fd2904b2e2cf6 (diff)
parent14032b8a85f42c89d86925c47bd3e10270779a46 (diff)
downloadgitlab-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.rb4
-rw-r--r--app/controllers/projects/settings/badges_controller.rb4
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