use webhook urls instead of encrypted configs

This commit is contained in:
Alex Turchyn authored and Pete Matsyburka committed 2024-11-02 22:12:41 +02:00
1 parent f669045362
commit 84edb6dbda
50 files changed
+1350 -269

No files matched your search

+4 -1
View File
@@ -14,7 +14,10 @@ module Submitters
unless submitter.submission_events.exists?(event_type: 'start_form')
SubmissionEvents.create_with_tracking_data(submitter, 'start_form', request)
SendFormStartedWebhookRequestJob.perform_async({ 'submitter_id' => submitter.id })
submitter.account.webhook_urls.with_event('form.started').each do |webhook_url|
SendFormStartedWebhookRequestJob.perform_async({ 'submitter_id' => submitter.id,
'webhook_url_id' => webhook_url.id })
end
end
update_submitter!(submitter, params, request)