Commit 517ae37e authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'improve-badge-api-paths' into 'master'

Use a path instead of URL for badge API endpoints

See merge request gitlab-org/gitlab!25493
parents 1dee7f65 b65c5984
...@@ -97,7 +97,7 @@ class GroupsController < Groups::ApplicationController ...@@ -97,7 +97,7 @@ class GroupsController < Groups::ApplicationController
end end
def edit def edit
@badge_api_endpoint = expose_url(api_v4_groups_badges_path(id: @group.id)) @badge_api_endpoint = expose_path(api_v4_groups_badges_path(id: @group.id))
end end
def projects def projects
......
...@@ -50,7 +50,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -50,7 +50,7 @@ class ProjectsController < Projects::ApplicationController
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
def edit def edit
@badge_api_endpoint = expose_url(api_v4_projects_badges_path(id: @project.id)) @badge_api_endpoint = expose_path(api_v4_projects_badges_path(id: @project.id))
render_edit render_edit
end end
......
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