Skip to content

Commit

Permalink
Merge branch '66464-typo-in-release_endpoint_requiremets-constant' in…
Browse files Browse the repository at this point in the history
…to 'master'

Resolve "Typo in RELEASE_ENDPOINT_REQUIREMETS constant"

Closes #66464

See merge request gitlab-org/gitlab-ce!32468
  • Loading branch information
mkozono committed Sep 3, 2019
2 parents b23e42b + fc9f389 commit 5256f01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/api/release/links.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Release
class Links < Grape::API
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)

before { authorize! :read_release, user_project }
Expand All @@ -17,7 +17,7 @@ class Links < Grape::API
params do
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
end
resource 'releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do
resource 'releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
resource :assets do
desc 'Get a list of links of a release' do
detail 'This feature was introduced in GitLab 11.7.'
Expand Down
8 changes: 4 additions & 4 deletions lib/api/releases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module API
class Releases < Grape::API
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)

before { authorize_read_releases! }
Expand Down Expand Up @@ -33,7 +33,7 @@ class Releases < Grape::API
params do
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
end
get ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do
get ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
authorize_download_code!

present release, with: Entities::Release, current_user: current_user
Expand Down Expand Up @@ -82,7 +82,7 @@ class Releases < Grape::API
optional :released_at, type: DateTime, desc: 'The date when the release will be/was ready.'
optional :milestone, type: String, desc: 'The title of the related milestone'
end
put ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do
put ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
authorize_update_release!

result = ::Releases::UpdateService
Expand All @@ -103,7 +103,7 @@ class Releases < Grape::API
params do
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
end
delete ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do
delete ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
authorize_destroy_release!

result = ::Releases::DestroyService
Expand Down

0 comments on commit 5256f01

Please sign in to comment.