Commit fc9f3894 authored by Sean Carroll's avatar Sean Carroll

Correct typo in constant

parent e4af69a7
...@@ -5,7 +5,7 @@ module API ...@@ -5,7 +5,7 @@ module API
class Links < Grape::API class Links < Grape::API
include PaginationParams include PaginationParams
RELEASE_ENDPOINT_REQUIREMETS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS RELEASE_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS
.merge(tag_name: API::NO_SLASH_URL_PART_REGEX) .merge(tag_name: API::NO_SLASH_URL_PART_REGEX)
before { authorize! :read_release, user_project } before { authorize! :read_release, user_project }
...@@ -17,7 +17,7 @@ module API ...@@ -17,7 +17,7 @@ module API
params do params do
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
end end
resource 'releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do resource 'releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
resource :assets do resource :assets do
desc 'Get a list of links of a release' do desc 'Get a list of links of a release' do
detail 'This feature was introduced in GitLab 11.7.' detail 'This feature was introduced in GitLab 11.7.'
......
...@@ -4,7 +4,7 @@ module API ...@@ -4,7 +4,7 @@ module API
class Releases < Grape::API class Releases < Grape::API
include PaginationParams include PaginationParams
RELEASE_ENDPOINT_REQUIREMETS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS RELEASE_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS
.merge(tag_name: API::NO_SLASH_URL_PART_REGEX) .merge(tag_name: API::NO_SLASH_URL_PART_REGEX)
before { authorize_read_releases! } before { authorize_read_releases! }
...@@ -33,7 +33,7 @@ module API ...@@ -33,7 +33,7 @@ module API
params do params do
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
end end
get ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do get ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
authorize_download_code! authorize_download_code!
present release, with: Entities::Release, current_user: current_user present release, with: Entities::Release, current_user: current_user
...@@ -80,7 +80,7 @@ module API ...@@ -80,7 +80,7 @@ module API
optional :description, type: String, desc: 'Release notes with markdown support' optional :description, type: String, desc: 'Release notes with markdown support'
optional :released_at, type: DateTime, desc: 'The date when the release will be/was ready.' optional :released_at, type: DateTime, desc: 'The date when the release will be/was ready.'
end end
put ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do put ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
authorize_update_release! authorize_update_release!
result = ::Releases::UpdateService result = ::Releases::UpdateService
...@@ -101,7 +101,7 @@ module API ...@@ -101,7 +101,7 @@ module API
params do params do
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
end end
delete ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do delete ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
authorize_destroy_release! authorize_destroy_release!
result = ::Releases::DestroyService result = ::Releases::DestroyService
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment