diff options
Diffstat (limited to 'lib/api/todos.rb')
-rw-r--r-- | lib/api/todos.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/api/todos.rb b/lib/api/todos.rb index d1f7e364029..b9c3434fee1 100644 --- a/lib/api/todos.rb +++ b/lib/api/todos.rb @@ -59,8 +59,7 @@ 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) present todo.reload, with: Entities::Todo, current_user: current_user end |