diff options
Diffstat (limited to 'lib/api/v3/builds.rb')
-rw-r--r-- | lib/api/v3/builds.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/v3/builds.rb b/lib/api/v3/builds.rb index c189d486f50..fa0bef39602 100644 --- a/lib/api/v3/builds.rb +++ b/lib/api/v3/builds.rb @@ -8,7 +8,7 @@ module API params do requires :id, type: String, desc: 'The ID of a project' end - resource :projects do + resource :projects, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do helpers do params :optional_scope do optional :scope, types: [String, Array[String]], desc: 'The scope of builds to show', @@ -169,7 +169,7 @@ module API authorize_update_builds! build = get_build!(params[:build_id]) - authorize!(:update_build, build) + authorize!(:erase_build, build) return forbidden!('Build is not erasable!') unless build.erasable? build.erase(erased_by: current_user) |