Support multiple newleaf urls

This commit is contained in:
Ajay Ramachandran
2021-06-03 11:38:21 -04:00
parent 1e5849f504
commit ec081cf0c5
7 changed files with 10 additions and 10 deletions

View File

@@ -57,10 +57,10 @@ async function sendWebhooks(voteData: VoteData) {
webhookURL = config.discordCompletelyIncorrectReportWebhookURL;
}
if (config.newLeafURL !== null) {
if (config.newLeafURLs !== null) {
const { err, data } = await YouTubeAPI.listVideos(submissionInfoRow.videoID);
if (err) return;
const isUpvote = voteData.incrementAmount > 0;
// Send custom webhooks
dispatchEvent(isUpvote ? "vote.up" : "vote.down", {