summaryrefslogtreecommitdiff
path: root/app/services/slash_commands/interpret_service.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-08-11 19:00:06 +0200
committerRémy Coutable <remy@rymai.me>2016-08-13 00:06:12 +0200
commitaadc5062ebe755aaf3fbb27fdd0af093770c9ce8 (patch)
treeab50aadfdf1733ba6aec5ff8a036cc5d0f543341 /app/services/slash_commands/interpret_service.rb
parent42e30a5012bb3384ee6f275ff058d4c0841776cd (diff)
downloadgitlab-ce-aadc5062ebe755aaf3fbb27fdd0af093770c9ce8.tar.gz
New TodoService#todo_exists? method
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/services/slash_commands/interpret_service.rb')
-rw-r--r--app/services/slash_commands/interpret_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/slash_commands/interpret_service.rb b/app/services/slash_commands/interpret_service.rb
index ae22ed6b845..f8aeefbfbce 100644
--- a/app/services/slash_commands/interpret_service.rb
+++ b/app/services/slash_commands/interpret_service.rb
@@ -140,7 +140,7 @@ module SlashCommands
condition do
noteable.persisted? &&
current_user &&
- !TodosFinder.new(current_user).execute.exists?(target: noteable)
+ !TodoService.new.todo_exist?(noteable, current_user)
end
command :todo do
@updates[:todo_event] = 'add'
@@ -149,7 +149,7 @@ module SlashCommands
desc 'Mark todo as done'
condition do
current_user &&
- TodosFinder.new(current_user).execute.exists?(target: noteable)
+ TodoService.new.todo_exist?(noteable, current_user)
end
command :done do
@updates[:todo_event] = 'done'