From 5a0eb83488f98d70bdb2c635610a0d44087ccecc Mon Sep 17 00:00:00 2001 From: Yanhui Li Date: Thu, 26 Oct 2023 19:18:09 +1100 Subject: [PATCH] Call php app with auth token --- firebase-functions/paddle-webhook/functions/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firebase-functions/paddle-webhook/functions/index.js b/firebase-functions/paddle-webhook/functions/index.js index 15dc5b5e..0c318292 100644 --- a/firebase-functions/paddle-webhook/functions/index.js +++ b/firebase-functions/paddle-webhook/functions/index.js @@ -36,7 +36,8 @@ exports.sync_diagram = functions.https.onRequest(async (req, res) => { 'Content-Type': 'application/json' } }; - const data = JSON.stringify({name: req.body.name, content: req.body.content, description: req.body.description,imageBase64: req.body.imageBase64}); + const data = JSON.stringify({token: req.body.token, name: req.body.name, content: req.body.content, description: req.body.description,imageBase64: req.body.imageBase64}); + console.log('http request with:', options, data); const request = http.request(options, (response) => { let responseData = '';