summaryrefslogtreecommitdiff
path: root/lib/api/todos.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-08-07 15:20:09 -0500
committerMike Greiling <mike@pixelcog.com>2017-08-07 15:20:09 -0500
commit7767ceef47a57baf2bc03f609e3dbf77ed44c9aa (patch)
tree0d057168bfba56bff88f2bf1b4e8f19af0aa2204 /lib/api/todos.rb
parent1d5a306596e56398c3f6f46feafd1f4ce23c3c2c (diff)
parentb12107a0b953b566cd58db30ae880800a4a695a6 (diff)
downloadgitlab-ce-7767ceef47a57baf2bc03f609e3dbf77ed44c9aa.tar.gz
Merge branch 'master' into ide
* master: (177 commits) Add changelog Bump gitlab-shell version to 5.8.0 to fix Git for Windows 2.14 Make contextual sidebar collapsible Fixed sidebar context header hover colors Use correct `Environment`-class within `Gitlab` namespace Remove gl.Activities from Commits page Move `let` calls inside the `describe` block using them Add `/assign me` alias support for assigning issuables to oneself GRPC::Unavailable (< GRPC::BadStatus) is wrapped in a CommandError Use `broken_storage` in the fs_shards_spec. Eager load project creators for project dashboards Memoize a user's personal projects count Remove redundant query from User#recent_push Improve checking if projects would be returned Change spelling of gitlab-shell Remove unused #tree-holder Add custom linter for inline JavaScript to haml_lint Rename user_can_admin? because it's more accurate Synchronous zanata community contribution translation Add Korean translation to i18n ...
Diffstat (limited to 'lib/api/todos.rb')
-rw-r--r--lib/api/todos.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/todos.rb b/lib/api/todos.rb
index d1f7e364029..55191169dd4 100644
--- a/lib/api/todos.rb
+++ b/lib/api/todos.rb
@@ -59,10 +59,10 @@ module API
requires :id, type: Integer, desc: 'The ID of the todo being marked as done'
end
post ':id/mark_as_done' do
- todo = current_user.todos.find(params[:id])
- TodoService.new.mark_todos_as_done([todo], current_user)
+ TodoService.new.mark_todos_as_done_by_ids(params[:id], current_user)
+ todo = Todo.find(params[:id])
- present todo.reload, with: Entities::Todo, current_user: current_user
+ present todo, with: Entities::Todo, current_user: current_user
end
desc 'Mark all todos as done'