summaryrefslogtreecommitdiff
path: root/lib/api/boards.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/boards.rb')
-rw-r--r--lib/api/boards.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/api/boards.rb b/lib/api/boards.rb
index f4226e5a89d..5a2d7a681e3 100644
--- a/lib/api/boards.rb
+++ b/lib/api/boards.rb
@@ -7,7 +7,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
- resource :projects do
+ resource :projects, requirements: { id: %r{[^/]+} } do
desc 'Get all project boards' do
detail 'This feature was introduced in 8.13'
success Entities::Board
@@ -127,9 +127,7 @@ module API
service = ::Boards::Lists::DestroyService.new(user_project, current_user)
- if service.execute(list)
- present list, with: Entities::List
- else
+ unless service.execute(list)
render_api_error!({ error: 'List could not be deleted!' }, 400)
end
end