Don't reveal to the API the list of subscribers
This commit is contained in:
parent
e3c11476fb
commit
43837210ed
1 changed files with 3 additions and 1 deletions
|
@ -282,7 +282,9 @@ router.postAsync('/:cid/subscribe', passport.parseForm, corsOrCsrfProtection, as
|
||||||
if (existingSubscription && existingSubscription.status === SubscriptionStatus.SUBSCRIBED) {
|
if (existingSubscription && existingSubscription.status === SubscriptionStatus.SUBSCRIBED) {
|
||||||
await mailHelpers.sendAlreadySubscribed(req.locale, list, email, existingSubscription);
|
await mailHelpers.sendAlreadySubscribed(req.locale, list, email, existingSubscription);
|
||||||
if (req.xhr) {
|
if (req.xhr) {
|
||||||
throw new Error(tUI('listEmailAddressAlreadyRegistered', req.locale, {list: list.name}));
|
return res.status(200).json({
|
||||||
|
msg: tUI('pleaseConfirmSubscription', req.locale)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
res.redirect('/subscription/' + encodeURIComponent(req.params.cid) + '/confirm-subscription-notice');
|
res.redirect('/subscription/' + encodeURIComponent(req.params.cid) + '/confirm-subscription-notice');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue