This commit is contained in:
@@ -41,6 +41,8 @@ app.post("/report", async (req, res) => {
|
|||||||
|
|
||||||
const url = `https://n8n.local.jzitnik.dev/webhook/${process.env.WEBHOOK_UUID}`;
|
const url = `https://n8n.local.jzitnik.dev/webhook/${process.env.WEBHOOK_UUID}`;
|
||||||
|
|
||||||
|
console.log(url)
|
||||||
|
|
||||||
const resp = await fetch(url, {
|
const resp = await fetch(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -49,8 +51,6 @@ app.post("/report", async (req, res) => {
|
|||||||
body: `${content}\n\nClass: ${className}\nLocation: ${location}`,
|
body: `${content}\n\nClass: ${className}\nLocation: ${location}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(resp);
|
|
||||||
|
|
||||||
if (!resp.ok) {
|
if (!resp.ok) {
|
||||||
throw new Error(`Request failed`);
|
throw new Error(`Request failed`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user