diff options
Diffstat (limited to 'lib/api/group_boards.rb')
-rw-r--r-- | lib/api/group_boards.rb | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/api/group_boards.rb b/lib/api/group_boards.rb index 9a20ee8c8b9..0479b877e35 100644 --- a/lib/api/group_boards.rb +++ b/lib/api/group_boards.rb @@ -16,65 +16,65 @@ module API end params do - requires :id, type: String, desc: 'The ID of a group' + requires :id, type: String, desc: "The ID of a group" end resource :groups, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do - segment ':id/boards' do - desc 'Find a group board' do - detail 'This feature was introduced in 10.6' + segment ":id/boards" do + desc "Find a group board" do + detail "This feature was introduced in 10.6" success ::API::Entities::Board end - get '/:board_id' do + get "/:board_id" do present board, with: ::API::Entities::Board end - desc 'Get all group boards' do - detail 'This feature was introduced in 10.6' + desc "Get all group boards" do + detail "This feature was introduced in 10.6" success Entities::Board end params do use :pagination end - get '/' do + get "/" do present paginate(board_parent.boards), with: Entities::Board end end params do - requires :board_id, type: Integer, desc: 'The ID of a board' + requires :board_id, type: Integer, desc: "The ID of a board" end - segment ':id/boards/:board_id' do - desc 'Get the lists of a group board' do - detail 'Does not include backlog and closed lists. This feature was introduced in 10.6' + segment ":id/boards/:board_id" do + desc "Get the lists of a group board" do + detail "Does not include backlog and closed lists. This feature was introduced in 10.6" success Entities::List end params do use :pagination end - get '/lists' do + get "/lists" do present paginate(board_lists), with: Entities::List end - desc 'Get a list of a group board' do - detail 'This feature was introduced in 10.6' + desc "Get a list of a group board" do + detail "This feature was introduced in 10.6" success Entities::List end params do - requires :list_id, type: Integer, desc: 'The ID of a list' + requires :list_id, type: Integer, desc: "The ID of a list" end - get '/lists/:list_id' do + get "/lists/:list_id" do present board_lists.find(params[:list_id]), with: Entities::List end - desc 'Create a new board list' do - detail 'This feature was introduced in 10.6' + desc "Create a new board list" do + detail "This feature was introduced in 10.6" success Entities::List end params do use :list_creation_params end - post '/lists' do + post "/lists" do authorize_list_type_resource! authorize!(:admin_list, user_group) @@ -82,15 +82,15 @@ module API create_list end - desc 'Moves a board list to a new position' do - detail 'This feature was introduced in 10.6' + desc "Moves a board list to a new position" do + detail "This feature was introduced in 10.6" success Entities::List end params do - requires :list_id, type: Integer, desc: 'The ID of a list' - requires :position, type: Integer, desc: 'The position of the list' + requires :list_id, type: Integer, desc: "The ID of a list" + requires :position, type: Integer, desc: "The position of the list" end - put '/lists/:list_id' do + put "/lists/:list_id" do list = board_lists.find(params[:list_id]) authorize!(:admin_list, user_group) @@ -98,12 +98,12 @@ module API move_list(list) end - desc 'Delete a board list' do - detail 'This feature was introduced in 10.6' + desc "Delete a board list" do + detail "This feature was introduced in 10.6" success Entities::List end params do - requires :list_id, type: Integer, desc: 'The ID of a board list' + requires :list_id, type: Integer, desc: "The ID of a board list" end delete "/lists/:list_id" do authorize!(:admin_list, user_group) |