diff --git a/server.js b/server.js index c588a5d..2109e96 100644 --- a/server.js +++ b/server.js @@ -38,7 +38,7 @@ app.post("/report", async (req, res) => { const url = `https://n8n.local.jzitnik.dev/webhook/${process.env.WEBHOOK_UUID}`; - const res = await fetch(url, { + const resp = await fetch(url, { method: "POST", headers: { "Content-Type": "text/plain", @@ -46,7 +46,7 @@ app.post("/report", async (req, res) => { body: `${content}\n\nClass: ${className}\nLocation: ${location}`, }); - if (!res.ok) { + if (!resp.ok) { throw new Error(`Request failed`); }