adjust webhooks

This commit is contained in:
Pete Matsyburka committed 2024-11-03 09:49:30 +02:00
1 parent 84edb6dbda
commit 2542f26d96
40 files changed
+156 -235

No files matched your search

@@ -25,9 +25,9 @@ module Api
schema_documents = Templates::CloneAttachments.call(template: cloned_template, original_template: @template)
cloned_template.account.webhook_urls.with_event('template.created').each do |webhook_url|
SendTemplateCreatedWebhookRequestJob.perform_async({ 'template_id' => cloned_template.id,
'webhook_url_id' => webhook_url.id })
WebhookUrls.for_account_id(cloned_template.account_id, 'template.created').each do |webhook_url|
SendTemplateCreatedWebhookRequestJob.perform_async('template_id' => cloned_template.id,
'webhook_url_id' => webhook_url.id)
end
render json: Templates::SerializeForApi.call(cloned_template, schema_documents)