mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 04:34:15 -04:00
(admin) always send notifications about proposed translations to translations role, not code role
code role cannot do anything yet, because they are not mergeable
This commit is contained in:
parent
8257173dbe
commit
c4086e1cde
@ -34,14 +34,8 @@ router.post('/translations/propose', handleErrorAsync(async (req, res) => {
|
|||||||
changes: req.body.changes,
|
changes: req.body.changes,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (req.isGranted('translations')) {
|
for (const { email } of await findAdmins(req.db, global.config.locale, 'translations')) {
|
||||||
for (const { email } of await findAdmins(req.db, global.config.locale, 'code')) {
|
await deduplicateEmailPreset(req.db, email, 'translationProposed', { locale: global.config.locale });
|
||||||
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 });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.json('OK');
|
return res.json('OK');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user