diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-10 15:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-10 15:09:14 +0300 |
commit | 152b3268d701b54cac9b615a0e29e0e5726bfd99 (patch) | |
tree | deb2e10bd5aa7c5fd54988fb8bc2ca9ec819c0b2 /app/presenters | |
parent | 921173681c207356914a35ea3dca1afffeac8b05 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/packages/composer/packages_presenter.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/app/presenters/packages/composer/packages_presenter.rb b/app/presenters/packages/composer/packages_presenter.rb index 381cf2dd2c9..8e3f482126d 100644 --- a/app/presenters/packages/composer/packages_presenter.rb +++ b/app/presenters/packages/composer/packages_presenter.rb @@ -11,8 +11,19 @@ module Packages end def root - path = expose_path(api_v4_group___packages_composer_package_name_path({ id: @group.id, package_name: '%package%$%hash%', format: '.json' }, true)) - { 'packages' => [], 'provider-includes' => { 'p/%hash%.json' => { 'sha256' => provider_sha } }, 'providers-url' => path } + v1_path = expose_path(api_v4_group___packages_composer_package_name_path({ id: @group.id, package_name: '%package%$%hash%', format: '.json' }, true)) + v2_path = expose_path(api_v4_group___packages_composer_p2_package_name_path({ id: @group.id, package_name: '%package%', format: '.json' }, true)) + + { + 'packages' => [], + 'provider-includes' => { + 'p/%hash%.json' => { + 'sha256' => provider_sha + } + }, + 'providers-url' => v1_path, + 'metadata-url' => v2_path + } end def provider |