adjust webhooks

This commit is contained in:
Pete Matsyburka
2024-11-01 15:35:02 +02:00
parent 84edb6dbda
commit 2542f26d96
40 changed files with 156 additions and 235 deletions
@@ -25,9 +25,9 @@ class SubmitFormDeclineController < ApplicationController
SubmitterMailer.declined_email(submitter, user).deliver_later!
end
submitter.account.webhook_urls.with_event('form.declined').each do |webhook_url|
SendFormDeclinedWebhookRequestJob.perform_async({ 'submitter_id' => submitter.id,
'webhook_url_id' => webhook_url.id })
WebhookUrls.for_account_id(submitter.account_id, 'form.declined').each do |webhook_url|
SendFormDeclinedWebhookRequestJob.perform_async('submitter_id' => submitter.id,
'webhook_url_id' => webhook_url.id)
end
redirect_to submit_form_path(submitter.slug)