diff options
Diffstat (limited to 'lib/api/boards.rb')
-rw-r--r-- | lib/api/boards.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/api/boards.rb b/lib/api/boards.rb index d2d1628aff4..f4b23c507f4 100644 --- a/lib/api/boards.rb +++ b/lib/api/boards.rb @@ -9,6 +9,8 @@ module API before { authenticate! } + feature_category :boards + helpers do def board_parent user_project @@ -40,6 +42,43 @@ module API authorize!(:read_board, user_project) present board, with: Entities::Board end + + desc 'Create a project board' do + detail 'This feature was introduced in 10.4' + success Entities::Board + end + params do + requires :name, type: String, desc: 'The board name' + end + post '/' do + authorize!(:admin_board, board_parent) + + create_board + end + + desc 'Update a project board' do + detail 'This feature was introduced in 11.0' + success Entities::Board + end + params do + use :update_params + end + put '/:board_id' do + authorize!(:admin_board, board_parent) + + update_board + end + + desc 'Delete a project board' do + detail 'This feature was introduced in 10.4' + success Entities::Board + end + + delete '/:board_id' do + authorize!(:admin_board, board_parent) + + delete_board + end end params do |