提交 879ddf72 编写于 作者: D 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
module Groups module Groups
module Settings module Settings
class BadgesController < Groups::ApplicationController class BadgesController < Groups::ApplicationController
include GrapeRouteHelpers::NamedRouteMatcher include API::Helpers::RelatedResourcesHelpers
before_action :authorize_admin_group! before_action :authorize_admin_group!
def index 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 end
end end
......
module Projects module Projects
module Settings module Settings
class BadgesController < Projects::ApplicationController class BadgesController < Projects::ApplicationController
include GrapeRouteHelpers::NamedRouteMatcher include API::Helpers::RelatedResourcesHelpers
before_action :authorize_admin_project! before_action :authorize_admin_project!
def index 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 end
end end
......
---
title: Fixed badge api endpoint route when relative url is set
merge_request: 19004
author:
type: fixed
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册