Skip to content

Commit 6afd8fb

Browse files
committed
Add debug logging
1 parent 5a3a69c commit 6afd8fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/server/routes/webhookProxy.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ const axios = require("axios")
33
const router = require("express").Router()
44

55
router.get("/:webhookId", async (req, res) => {
6+
console.log(req)
67
// only allow POST
78
if (req.method === "POST") {
89
const webhookUrl = `${process.env.DISCORD_WEBHOOK_URL}/${req.params.webhookId}/${process.env.DISCORD_WEBHOOK_TOKEN}`
910
const webhookData = req.body
1011
try {
12+
console.log('Sending webhook', webhookUrl, webhookData)
1113
await axios.post(webhookUrl, webhookData, { params: req.query })
14+
console.log('Webhook sent successfully')
1215
res.status(200).send("Webhook sent successfully")
1316
return
1417
} catch (error) {

0 commit comments

Comments
 (0)