diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /lib/api/releases.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'lib/api/releases.rb')
-rw-r--r-- | lib/api/releases.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/api/releases.rb b/lib/api/releases.rb index e6884e66200..e69dc756551 100644 --- a/lib/api/releases.rb +++ b/lib/api/releases.rb @@ -150,18 +150,19 @@ module API params do requires :tag_name, type: String, desc: 'The Git tag the release is associated with', as: :tag - requires :file_path, + requires :direct_asset_path, type: String, file_path: true, - desc: 'The path to the file to download, as specified when creating the release asset' + desc: 'The path to the file to download, as specified when creating the release asset', + as: :filepath end route_setting :authentication, job_token_allowed: true - get ':id/releases/:tag_name/downloads/*file_path', format: false, requirements: RELEASE_ENDPOINT_REQUIREMENTS do + get ':id/releases/:tag_name/downloads/*direct_asset_path', format: false, requirements: RELEASE_ENDPOINT_REQUIREMENTS do authorize_read_code! not_found! unless release - link = release.links.find_by_filepath!("/#{params[:file_path]}") + link = release.links.find_by_filepath!("/#{params[:filepath]}") not_found! unless link @@ -237,7 +238,7 @@ module API optional :links, type: Array do requires :name, type: String, desc: 'The name of the link. Link names must be unique within the release' requires :url, type: String, desc: 'The URL of the link. Link URLs must be unique within the release' - optional :filepath, type: String, desc: 'Optional path for a direct asset link' + optional :direct_asset_path, type: String, desc: 'Optional path for a direct asset link', as: :filepath optional :link_type, type: String, desc: 'The type of the link: `other`, `runbook`, `image`, `package`. Defaults to `other`' end end |