Commit b65c5984 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Use a path instead of URL for badge API endpoints

This makes this work for setups where the gitlab.yml host
is different from the one being used to access the application
parent 4caa2f25
......@@ -97,7 +97,7 @@ class GroupsController < Groups::ApplicationController
end
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
def projects
......
......@@ -50,7 +50,7 @@ class ProjectsController < Projects::ApplicationController
# rubocop: enable CodeReuse/ActiveRecord
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
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