summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/spammable_actions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/concerns/spammable_actions.rb')
-rw-r--r--app/controllers/concerns/spammable_actions.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/concerns/spammable_actions.rb b/app/controllers/concerns/spammable_actions.rb
index 85be25d84cc..296811267e5 100644
--- a/app/controllers/concerns/spammable_actions.rb
+++ b/app/controllers/concerns/spammable_actions.rb
@@ -6,13 +6,7 @@ module SpammableActions
end
def mark_as_spam
- if spammable.submit_spam
- spammable.user_agent_detail.update_attribute(:submitted, true)
-
- if spammable.is_a?(Issuable)
- SystemNoteService.submit_spam(spammable, spammable.project, current_user)
- end
-
+ if SpamService.new(spammable).mark_as_spam!(current_user)
redirect_to spammable, notice: 'Issue was submitted to Akismet successfully.'
else
flash[:error] = 'Error with Akismet. Please check the logs for more info.'