summaryrefslogtreecommitdiff
path: root/lib/api/boards.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/api/boards.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'lib/api/boards.rb')
-rw-r--r--lib/api/boards.rb56
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/api/boards.rb b/lib/api/boards.rb
index b7c77730afb..ee7c2123e13 100644
--- a/lib/api/boards.rb
+++ b/lib/api/boards.rb
@@ -14,68 +14,68 @@ module API
end
params do
- requires :id, type: String, desc: 'The ID of a project'
+ requires :id, type: String, desc: "The ID of a project"
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
- segment ':id/boards' do
- desc 'Get all project boards' do
- detail 'This feature was introduced in 8.13'
+ segment ":id/boards" do
+ desc "Get all project boards" do
+ detail "This feature was introduced in 8.13"
success Entities::Board
end
params do
use :pagination
end
- get '/' do
+ get "/" do
authorize!(:read_board, user_project)
present paginate(board_parent.boards), with: Entities::Board
end
- desc 'Find a project board' do
- detail 'This feature was introduced in 10.4'
+ desc "Find a project board" do
+ detail "This feature was introduced in 10.4"
success Entities::Board
end
- get '/:board_id' do
+ get "/:board_id" do
authorize!(:read_board, user_project)
present board, 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 project board' do
- detail 'Does not include `done` list. This feature was introduced in 8.13'
+ segment ":id/boards/:board_id" do
+ desc "Get the lists of a project board" do
+ detail "Does not include `done` list. This feature was introduced in 8.13"
success Entities::List
end
params do
use :pagination
end
- get '/lists' do
+ get "/lists" do
authorize!(:read_board, user_project)
present paginate(board_lists), with: Entities::List
end
- desc 'Get a list of a project board' do
- detail 'This feature was introduced in 8.13'
+ desc "Get a list of a project board" do
+ detail "This feature was introduced in 8.13"
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
authorize!(:read_board, user_project)
present board_lists.find(params[:list_id]), with: Entities::List
end
- desc 'Create a new board list' do
- detail 'This feature was introduced in 8.13'
+ desc "Create a new board list" do
+ detail "This feature was introduced in 8.13"
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_project)
@@ -83,15 +83,15 @@ module API
create_list
end
- desc 'Moves a board list to a new position' do
- detail 'This feature was introduced in 8.13'
+ desc "Moves a board list to a new position" do
+ detail "This feature was introduced in 8.13"
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_project)
@@ -99,12 +99,12 @@ module API
move_list(list)
end
- desc 'Delete a board list' do
- detail 'This feature was introduced in 8.13'
+ desc "Delete a board list" do
+ detail "This feature was introduced in 8.13"
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_project)