Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-19 15:16:15 +0300
committerRémy Coutable <remy@rymai.me>2016-07-19 17:35:10 +0300
commit510d53d037e6de83d43418fab5353fdedac4ae97 (patch)
treeab481d47b507b8ce3adb796231c173bc251d1466 /lib
parente8acbac3f2d339be404eb6c944a9aaf2154cf52a (diff)
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