From 6ab0cd8ad99edce2f1778570e56afec0a96b2fc9 Mon Sep 17 00:00:00 2001 From: Avris Date: Sun, 6 Dec 2020 15:23:18 +0100 Subject: [PATCH] include sources in notification --- server/notify.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/notify.js b/server/notify.js index 7573cc10..d783d4f0 100644 --- a/server/notify.js +++ b/server/notify.js @@ -8,6 +8,7 @@ async function notify() { const awaitingModeration = [ ...(await db.all(`SELECT 'nouns' as type, locale, count(*) as c FROM nouns WHERE approved = 0 AND deleted=0 GROUP BY locale`)), ...(await db.all(`SELECT 'inclusive' as type, locale, count(*) as c FROM inclusive WHERE approved = 0 AND deleted=0 GROUP BY locale`)), + ...(await db.all(`SELECT 'sources' as type, locale, count(*) as c FROM sources WHERE approved = 0 AND deleted=0 GROUP BY locale`)), ]; if (!awaitingModeration.length) { console.log('No entries awaiting moderation'); @@ -29,8 +30,8 @@ async function notify() { console.log('Sending email to ' + email) mailer( email, - '[Pronouns] Dictionary entries awaiting moderation: ' + count, - 'Dictionary entries awaiting moderation: \n' + JSON.stringify(awaitingModerationGrouped, null, 4), + '[Pronouns.page] Entries awaiting moderation: ' + count, + 'Entries awaiting moderation: \n' + JSON.stringify(awaitingModerationGrouped, null, 4), ); } }