diff options
Diffstat (limited to 'lib/api/concerns/packages/conan_endpoints.rb')
-rw-r--r-- | lib/api/concerns/packages/conan_endpoints.rb | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/api/concerns/packages/conan_endpoints.rb b/lib/api/concerns/packages/conan_endpoints.rb index e241633fa8b..d1cc35b16d8 100644 --- a/lib/api/concerns/packages/conan_endpoints.rb +++ b/lib/api/concerns/packages/conan_endpoints.rb @@ -56,7 +56,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'ping' do + get 'ping', urgency: :default do header 'X-Conan-Server-Capabilities', [].join(',') end @@ -70,7 +70,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'conans/search' do + get 'conans/search', urgency: :low do service = ::Packages::Conan::SearchService.new(current_user, query: params[:q]).execute service.payload end @@ -89,7 +89,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'authenticate' do + get 'authenticate', urgency: :low do unauthorized! unless token token.to_jwt @@ -101,7 +101,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'check_credentials' do + get 'check_credentials', urgency: :default do authenticate! :ok end @@ -133,7 +133,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'packages/:conan_package_reference' do + get 'packages/:conan_package_reference', urgency: :low do authorize!(:read_package, project) presenter = ::Packages::Conan::PackagePresenter.new( @@ -152,7 +152,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get do + get urgency: :low do authorize!(:read_package, project) presenter = ::Packages::Conan::PackagePresenter.new(package, current_user, project) @@ -174,7 +174,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'packages/:conan_package_reference/digest' do + get 'packages/:conan_package_reference/digest', urgency: :low do present_package_download_urls end @@ -184,7 +184,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'digest' do + get 'digest', urgency: :low do present_recipe_download_urls end @@ -204,7 +204,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'packages/:conan_package_reference/download_urls' do + get 'packages/:conan_package_reference/download_urls', urgency: :low do present_package_download_urls end @@ -214,7 +214,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get 'download_urls' do + get 'download_urls', urgency: :low do present_recipe_download_urls end @@ -235,7 +235,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - post 'packages/:conan_package_reference/upload_urls' do + post 'packages/:conan_package_reference/upload_urls', urgency: :low do authorize!(:read_package, project) status 200 @@ -248,7 +248,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - post 'upload_urls' do + post 'upload_urls', urgency: :low do authorize!(:read_package, project) status 200 @@ -261,7 +261,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - delete do + delete urgency: :low do authorize!(:destroy_package, project) track_package_event('delete_package', :conan, category: 'API::ConanPackages', user: current_user, project: project, namespace: project.namespace) @@ -297,7 +297,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get do + get urgency: :low do download_package_file(:recipe_file) end @@ -311,7 +311,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - put do + put urgency: :low do upload_package_file(:recipe_file) end @@ -321,7 +321,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - put 'authorize' do + put 'authorize', urgency: :low do authorize_workhorse!(subject: project, maximum_size: project.actual_limits.conan_max_file_size) end end @@ -338,7 +338,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - get do + get urgency: :low do download_package_file(:package_file) end @@ -348,7 +348,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - put 'authorize' do + put 'authorize', urgency: :low do authorize_workhorse!(subject: project, maximum_size: project.actual_limits.conan_max_file_size) end @@ -362,7 +362,7 @@ module API route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true - put do + put urgency: :low do upload_package_file(:package_file) end end |