0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Fix discord fetch code (#9663)

This commit is contained in:
Bjorn Lu 2024-01-11 21:35:12 +08:00 committed by GitHub
parent 7a275c1648
commit 8059a19ad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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',
},