Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

koa 请求不返回

$
0
0

为什么我这请求不返回

exports.signup = async (ctx)=>{
    const data = ctx.request.body;
    const user = await User.save(data);
    console.log(user)
    ctx.response.body = {
        success:true,
        data:'user'
    };
  
}

如果我注释掉 const user = await User.save(data); 这一行就能正确返回?


Viewing all articles
Browse latest Browse all 14821

Trending Articles