Commit 879ddf72 authored by Douwe Maan's avatar Douwe Maan

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
parents 8f159d92 14032b8a
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
......
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
......
---
title: Fixed badge api endpoint route when relative url is set
merge_request: 19004
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment