From c4086e1cded65fe1eb0ad82403e9ea13cdc168eb Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Fri, 8 Mar 2024 12:55:54 +0100 Subject: [PATCH] (admin) always send notifications about proposed translations to translations role, not code role code role cannot do anything yet, because they are not mergeable --- server/routes/translations.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/server/routes/translations.ts b/server/routes/translations.ts index 6b1f773d4..3dc604f91 100644 --- a/server/routes/translations.ts +++ b/server/routes/translations.ts @@ -34,14 +34,8 @@ router.post('/translations/propose', handleErrorAsync(async (req, res) => { changes: req.body.changes, }); - if (req.isGranted('translations')) { - for (const { email } of await findAdmins(req.db, global.config.locale, 'code')) { - await deduplicateEmailPreset(req.db, email, 'translationToMerge', { locale: global.config.locale }); - } - } else { - for (const { email } of await findAdmins(req.db, global.config.locale, 'translations')) { - await deduplicateEmailPreset(req.db, email, 'translationProposed', { locale: global.config.locale }); - } + for (const { email } of await findAdmins(req.db, global.config.locale, 'translations')) { + await deduplicateEmailPreset(req.db, email, 'translationProposed', { locale: global.config.locale }); } return res.json('OK');