Fixed badge api endpoint route when relative_url is set
This commit is contained in:
parent
bf80671283
commit
14032b8a85
|
@ -1,12 +1,12 @@
|
||||||
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
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
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
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fixed badge api endpoint route when relative url is set
|
||||||
|
merge_request: 19004
|
||||||
|
author:
|
||||||
|
type: fixed
|
Loading…
Reference in New Issue