Add webhook templating (#23289)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
a80efb449e
commit
4eda233e09
10 changed files with 134 additions and 11 deletions
|
@ -8,7 +8,7 @@ class Webhooks::DeliveryWorker
|
|||
|
||||
def perform(webhook_id, body)
|
||||
@webhook = Webhook.find(webhook_id)
|
||||
@body = body
|
||||
@body = @webhook.template.blank? ? body : Webhooks::PayloadRenderer.new(body).render(@webhook.template)
|
||||
@response = nil
|
||||
|
||||
perform_request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue