From d5a679731c1b990c94f8f4728dda39bbf183dfb4 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 28 Dec 2019 00:41:33 -0500 Subject: [PATCH] Removed notification for first time submission if there is a conflict. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c85910b..12db7e6 100644 --- a/index.js +++ b/index.js @@ -224,7 +224,7 @@ app.get('/api/postVideoSponsorTimes', async function (req, res) { //check if they are a first time user //if so, send a notification to discord - if (config.youtubeAPIKey !== null && config.discordFirstTimeSubmissionsWebhookURL !== null) { + if (config.youtubeAPIKey !== null && config.discordFirstTimeSubmissionsWebhookURL !== null && row == null) { let userSubmissionCountResult = await new Promise((resolve, reject) => { db.prepare("SELECT count(*) as submissionCount FROM sponsorTimes WHERE userID = ?").get(userID, (err, row) => resolve({err, row})); });