diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-15 20:36:06 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-15 20:36:06 +0200 |
commit | d626c1d3729f500a891a6934ea779136671ef8b2 (patch) | |
tree | 3ffe8ae1d06ccecac566b370b81df85fa16bc2de /lib/api/todos.rb | |
parent | 4d4ef89cdcb9beca66a13ab2b64e9eb45f8d8256 (diff) | |
parent | 640e485c6aa19f8fca1be7fc45e7f65da4469fbd (diff) | |
download | gitlab-ce-d626c1d3729f500a891a6934ea779136671ef8b2.tar.gz |
Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slack
Diffstat (limited to 'lib/api/todos.rb')
-rw-r--r-- | lib/api/todos.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/api/todos.rb b/lib/api/todos.rb index 26c24c3baff..19df13d8aac 100644 --- a/lib/api/todos.rb +++ b/lib/api/todos.rb @@ -61,9 +61,9 @@ module API # delete ':id' do todo = current_user.todos.find(params[:id]) - todo.done + TodoService.new.mark_todos_as_done([todo], current_user) - present todo, with: Entities::Todo, current_user: current_user + present todo.reload, with: Entities::Todo, current_user: current_user end # Mark all todos as done @@ -73,9 +73,7 @@ module API # delete do todos = find_todos - todos.each(&:done) - - todos.length + TodoService.new.mark_todos_as_done(todos, current_user) end end end |