Commit 32c85a65 authored by Nick Kipling's avatar Nick Kipling

Changing to use expose_url

parent 84db89ac
...@@ -11,22 +11,21 @@ module EE ...@@ -11,22 +11,21 @@ module EE
end end
def npm_package_registry_url def npm_package_registry_url
::Gitlab::Utils.append_path(::Gitlab.config.gitlab.url, expose_path(api_v4_packages_npm_package_name_path)) expose_url(api_v4_packages_npm_package_name_path)
end end
def conan_package_registry_url def conan_package_registry_url
::Gitlab::Utils.append_path(::Gitlab.config.gitlab.url, "api/#{::API::API.version}/packages/conan") expose_url("api/#{::API::API.version}/packages/conan")
end end
def nuget_package_registry_url(project_id) def nuget_package_registry_url(project_id)
project_registry_path = expose_path(api_v4_projects_packages_nuget_index_path(id: project_id, format: '.json')) expose_url(api_v4_projects_packages_nuget_index_path(id: project_id, format: '.json'))
::Gitlab::Utils.append_path(::Gitlab.config.gitlab.url, project_registry_path)
end end
def package_registry_project_url(project_id, registry_type = :maven) def package_registry_project_url(project_id, registry_type = :maven)
project_api_path = expose_path(api_v4_projects_path(id: project_id)) project_api_path = expose_path(api_v4_projects_path(id: project_id))
package_registry_project_path = "#{project_api_path}/packages/#{registry_type}" package_registry_project_path = "#{project_api_path}/packages/#{registry_type}"
::Gitlab::Utils.append_path(::Gitlab.config.gitlab.url, package_registry_project_path) expose_url(package_registry_project_path)
end end
end end
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