From 8059a19ad32d1dea09edd1b00c4685d75c9eb814 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Thu, 11 Jan 2024 21:35:12 +0800 Subject: [PATCH] Fix discord fetch code (#9663) --- scripts/notify/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/notify/index.js b/scripts/notify/index.js index 98d406cf01ea..7dd8a3751767 100755 --- a/scripts/notify/index.js +++ b/scripts/notify/index.js @@ -163,9 +163,9 @@ async function run() { } const content = await generateMessage(); - await fetch(JSON.stringify({ content }), { - url: `${process.env.DISCORD_WEBHOOK}?wait=true`, + await fetch(`${process.env.DISCORD_WEBHOOK}?wait=true`, { method: 'POST', + body: JSON.stringify({ content }), headers: { 'content-type': 'application/json', },