Redirect back to settings after switching to pro
parent
e233c7f503
commit
3b106f2325
|
@ -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');
|
||||
});
|
||||
} );
|
||||
|
||||
|
|
Loading…
Reference in New Issue