Redirect back to settings after switching to pro

master
Keith Irwin 2017-07-11 03:03:36 -04:00
parent e233c7f503
commit 3b106f2325
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
1 changed files with 2 additions and 2 deletions

View File

@ -347,11 +347,11 @@ router.route('/pro')
{$set:{ isPro:true }})
.then( (user)=>{
req.flash('success','You have been signed up for pro. ');
res.redirect(req.session.next||'/settings');
res.redirect('/settings');
})
.catch( (err)=>{
mw.throwErr(err,req);
res.redirect('/pro');
res.redirect('/settings/pro');
});
} );