summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/issues/create.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/issues/create.rb')
-rw-r--r--app/graphql/mutations/issues/create.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/graphql/mutations/issues/create.rb b/app/graphql/mutations/issues/create.rb
index 3a57e2434a5..7c4a851f8aa 100644
--- a/app/graphql/mutations/issues/create.rb
+++ b/app/graphql/mutations/issues/create.rb
@@ -73,7 +73,8 @@ module Mutations
project = authorized_find!(project_path)
params = build_create_issue_params(attributes.merge(author_id: current_user.id))
- issue = ::Issues::CreateService.new(project: project, current_user: current_user, params: params).execute
+ spam_params = ::Spam::SpamParams.new_from_request(request: context[:request])
+ issue = ::Issues::CreateService.new(project: project, current_user: current_user, params: params, spam_params: spam_params).execute
if issue.spam?
issue.errors.add(:base, 'Spam detected.')