From 6afd8fbdb72ced2c38f7e6983c40940924ae9f49 Mon Sep 17 00:00:00 2001 From: Tereshchenko Aleksandr Date: Mon, 22 Jul 2024 13:54:27 +0300 Subject: [PATCH] Add debug logging --- src/server/routes/webhookProxy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/routes/webhookProxy.js b/src/server/routes/webhookProxy.js index 3254061..8f58b21 100644 --- a/src/server/routes/webhookProxy.js +++ b/src/server/routes/webhookProxy.js @@ -3,12 +3,15 @@ const axios = require("axios") const router = require("express").Router() router.get("/:webhookId", async (req, res) => { + console.log(req) // only allow POST if (req.method === "POST") { const webhookUrl = `${process.env.DISCORD_WEBHOOK_URL}/${req.params.webhookId}/${process.env.DISCORD_WEBHOOK_TOKEN}` const webhookData = req.body try { + console.log('Sending webhook', webhookUrl, webhookData) await axios.post(webhookUrl, webhookData, { params: req.query }) + console.log('Webhook sent successfully') res.status(200).send("Webhook sent successfully") return } catch (error) {