summaryrefslogtreecommitdiff
path: root/lib/api/debian_project_packages.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/debian_project_packages.rb')
-rw-r--r--lib/api/debian_project_packages.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/debian_project_packages.rb b/lib/api/debian_project_packages.rb
index bcb4e8c8cbc..f8129c18dff 100644
--- a/lib/api/debian_project_packages.rb
+++ b/lib/api/debian_project_packages.rb
@@ -21,6 +21,8 @@ module API
end
namespace 'incoming/:file_name', requirements: FILE_NAME_REQUIREMENTS do
+ content_type :json, Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE
+
# PUT {projects|groups}/:id/-/packages/debian/incoming/:file_name
params do
requires :file, type: ::API::Validations::Types::WorkhorseFile, desc: 'The package file to be published (generated by Multipart middleware)'
@@ -42,10 +44,9 @@ module API
# PUT {projects|groups}/:id/-/packages/debian/incoming/:file_name/authorize
route_setting :authentication, deploy_token_allowed: true, basic_auth_personal_access_token: true, job_token_allowed: :basic_auth
- post 'authorize' do
+ put 'authorize' do
authorize_workhorse!(
subject: authorized_user_project,
- has_length: false,
maximum_size: authorized_user_project.actual_limits.debian_max_file_size
)
end