Fix headers when using node-fetch

This commit is contained in:
Ajay Ramachandran
2021-01-17 21:18:22 -05:00
parent acc9537bb7
commit 4561148ab2
3 changed files with 13 additions and 3 deletions

View File

@@ -113,7 +113,10 @@ function sendWebhooks(voteData: VoteData) {
"url": data.items[0].snippet.thumbnails.maxres ? data.items[0].snippet.thumbnails.maxres.url : "",
},
}],
})
}),
headers: {
'Content-Type': 'application/json'
}
})
.then(async res => {
if (res.status >= 400) {