summaryrefslogtreecommitdiff
path: root/app/controllers/groups/dependency_proxy_for_containers_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/groups/dependency_proxy_for_containers_controller.rb')
-rw-r--r--app/controllers/groups/dependency_proxy_for_containers_controller.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/groups/dependency_proxy_for_containers_controller.rb b/app/controllers/groups/dependency_proxy_for_containers_controller.rb
index f46902ef90f..0f640397320 100644
--- a/app/controllers/groups/dependency_proxy_for_containers_controller.rb
+++ b/app/controllers/groups/dependency_proxy_for_containers_controller.rb
@@ -1,7 +1,8 @@
# frozen_string_literal: true
class Groups::DependencyProxyForContainersController < Groups::ApplicationController
- include DependencyProxyAccess
+ include DependencyProxy::Auth
+ include DependencyProxy::GroupAccess
include SendFileUpload
before_action :ensure_token_granted!
@@ -9,13 +10,13 @@ class Groups::DependencyProxyForContainersController < Groups::ApplicationContro
attr_reader :token
- feature_category :package_registry
+ feature_category :dependency_proxy
def manifest
- result = DependencyProxy::PullManifestService.new(image, tag, token).execute
+ result = DependencyProxy::FindOrCreateManifestService.new(group, image, tag, token).execute
if result[:status] == :success
- render json: result[:manifest]
+ send_upload(result[:manifest].file)
else
render status: result[:http_status], json: result[:message]
end