Merge pull request #8135 from awesomeaniruddh/fix/unsub
Unsub from all FCC emails regardless of unsub link
This commit is contained in:
@ -177,7 +177,11 @@ module.exports = function(app) {
|
||||
});
|
||||
return res.redirect('/map');
|
||||
}
|
||||
return user.updateAttribute('sendMonthlyEmail', false, (err) => {
|
||||
return user.updateAttributes({
|
||||
sendMonthlyEmail: false,
|
||||
sendQuincyEmail: false,
|
||||
sendNotificationEmail: false
|
||||
}, (err) => {
|
||||
if (err) { return next(err); }
|
||||
req.flash('info', {
|
||||
msg: 'We\'ve successfully updated your Email preferences.'
|
||||
@ -219,7 +223,11 @@ module.exports = function(app) {
|
||||
});
|
||||
return res.redirect('/map');
|
||||
}
|
||||
return user.updateAttribute('sendQuincyEmail', false, (err) => {
|
||||
return user.updateAttributes({
|
||||
sendQuincyEmail: false,
|
||||
sendMonthlyEmail: false,
|
||||
sendNotificationEmail: false
|
||||
}, (err) => {
|
||||
if (err) { return next(err); }
|
||||
req.flash('info', {
|
||||
msg: 'We\'ve successfully updated your Email preferences.'
|
||||
|
Reference in New Issue
Block a user