add template webhooks

This commit is contained in:
Pete Matsyburka
2024-05-12 11:37:33 +03:00
parent 6f7128a51c
commit 929d29576d
7 changed files with 92 additions and 0 deletions
@@ -20,6 +20,8 @@ module Api
Templates::CloneAttachments.call(template: cloned_template, original_template: @template)
SendTemplateCreatedWebhookRequestJob.perform_later(cloned_template)
render json: Templates::SerializeForApi.call(cloned_template)
end
end
@@ -65,6 +65,8 @@ module Api
@template.update!(template_params)
SendTemplateUpdatedWebhookRequestJob.perform_later(@template)
render json: @template.as_json(only: %i[id updated_at])
end