📅  最后修改于: 2022-03-11 14:48:12.051000             🧑  作者: Mango
case '/local/forgot':
if( req.method==='POST' ) {
const email=req.body.email.toLowerCase();
return server.get_user_by_email( email ).then ( p => {
if ( p ) {
server.push_token( p, common.get_uuid() );
return res.redirect(`/auth/local/email_sent?email=${email}`);
}
else
return res.redirect(`/auth/local/forgot`);
});
}