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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/graphql/mutations/todos/restore.rb
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/graphql/mutations/todos/restore.rb')
-rw-r--r--app/graphql/mutations/todos/restore.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/graphql/mutations/todos/restore.rb b/app/graphql/mutations/todos/restore.rb
index c4597bd84a2..a0a1772db0a 100644
--- a/app/graphql/mutations/todos/restore.rb
+++ b/app/graphql/mutations/todos/restore.rb
@@ -18,7 +18,7 @@ module Mutations
def resolve(id:)
todo = authorized_find!(id: id)
- restore(todo.id) if todo.done?
+ restore(todo)
{
todo: todo.reset,
@@ -28,8 +28,8 @@ module Mutations
private
- def restore(id)
- TodoService.new.mark_todos_as_pending_by_ids([id], current_user)
+ def restore(todo)
+ TodoService.new.restore_todo(todo, current_user)
end
end
end