We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a3a69c commit 6afd8fbCopy full SHA for 6afd8fb
src/server/routes/webhookProxy.js
@@ -3,12 +3,15 @@ const axios = require("axios")
3
const router = require("express").Router()
4
5
router.get("/:webhookId", async (req, res) => {
6
+ console.log(req)
7
// only allow POST
8
if (req.method === "POST") {
9
const webhookUrl = `${process.env.DISCORD_WEBHOOK_URL}/${req.params.webhookId}/${process.env.DISCORD_WEBHOOK_TOKEN}`
10
const webhookData = req.body
11
try {
12
+ console.log('Sending webhook', webhookUrl, webhookData)
13
await axios.post(webhookUrl, webhookData, { params: req.query })
14
+ console.log('Webhook sent successfully')
15
res.status(200).send("Webhook sent successfully")
16
return
17
} catch (error) {
0 commit comments