📜  将 js 转换为 ts - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:12.051000             🧑  作者: Mango

代码示例8
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`);
             });
         }