diff options
| author | Adam Soltys <[email protected]> | 2023-06-06 00:31:54 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-06-06 00:31:59 -0700 |
| commit | 4b5c6dde01fd99fc5962420be37fb850f1fdaeb5 (patch) | |
| tree | 2f031a817bd474377b9005750ab1ceba3ab29f56 /lib/webhooks.js | |
| parent | 503dd491e537389d48fe2f1ee69e1b0d68330de8 (diff) | |
| download | coinos-server-4b5c6dde01fd99fc5962420be37fb850f1fdaeb5.tar.gz coinos-server-4b5c6dde01fd99fc5962420be37fb850f1fdaeb5.zip | |
pass webhook secret
Diffstat (limited to 'lib/webhooks.js')
| -rw-r--r-- | lib/webhooks.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/webhooks.js b/lib/webhooks.js index 1158fe9d..e5403b51 100644 --- a/lib/webhooks.js +++ b/lib/webhooks.js @@ -6,13 +6,13 @@ export const callWebhook = async (invoice, payment) => { try { if (!invoice || !payment) return; - let { address, received, text, webhook } = invoice; + let { address, received, text, webhook, secret } = invoice; if (webhook) { let { amount, confirmed, hash, memo } = payment; l("calling webhook", webhook, amount, hash, address, text); - let res = await got(webhook, { + let res = await got.post(webhook, { json: { address, amount, @@ -20,9 +20,10 @@ export const callWebhook = async (invoice, payment) => { hash, memo, received, - text + text, + secret } - }).res(); + }); return res; } } catch (e) { |
