summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-19 12:16:15 +0000
committerRémy Coutable <remy@rymai.me>2016-07-19 12:16:15 +0000
commit4db94cb9d779b0a0a3d5681846a68e0fd2d66b21 (patch)
tree2322a38d95b6b4e491b1b15472a8c92b237010c9 /lib
parent1cd573ee7f03bcb356478aab5900fae4618b53ec (diff)
parentbaa9ce848070e76ebec12322f938ac8ec7178cf0 (diff)
downloadgitlab-ce-4db94cb9d779b0a0a3d5681846a68e0fd2d66b21.tar.gz
Merge branch 'api-delete-todos' into 'master'
Api delete todos ## What does this MR do? It changes the `DELETE /todos` to only return the number of marked todos. ## Why was this MR needed? Before it returned the marked todos as an paginated array. Since we deleted/marked the todos, there was no way to get the rest of the todos. ## What are the relevant issue numbers? Closes #19678 ## Does this MR meet the acceptance criteria? ~~- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added~~ - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5341
Diffstat (limited to 'lib')
-rw-r--r--lib/api/todos.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/todos.rb b/lib/api/todos.rb
index 2a6bfa98ca4..26c24c3baff 100644
--- a/lib/api/todos.rb
+++ b/lib/api/todos.rb
@@ -75,7 +75,7 @@ module API
todos = find_todos
todos.each(&:done)
- present paginate(Kaminari.paginate_array(todos)), with: Entities::Todo, current_user: current_user
+ todos.length
end
end
end