Node.js 在登录应用程序中使用服务但不工作?
我在这方面有问题。这是我的全部代码Node.js 在登录应用程序中使用服务但不工作?,node.js,angular,mongodb,express,Node.js,Angular,Mongodb,Express,我在这方面有问题。这是我的全部代码 exports.create = async (model) => { count({email:req.body.user},function(result){ if(result < 0){ res.json("The email already exist") } else{ model.password = await
exports.create = async (model) => {
count({email:req.body.user},function(result){
if(result < 0){
res.json("The email already exist")
}
else{
model.password = await bcrypt.hash(model.password, 10)
let entity = new User({})
await set(entity, model)
await entity.save()
return entity
}
})
exports.create=async(model)=>{
计数({email:req.body.user},函数(结果){
如果(结果<0){
res.json(“电子邮件已经存在”)
}
否则{
model.password=等待bcrypt.hash(model.password,10)
让实体=新用户({})
等待集(实体、模型)
等待实体。保存()
返回实体
}
})
任何人都可以告诉我我的错误是什么吗考虑添加所有错误日志和您面临的问题。添加有关您尝试执行的操作的详细信息什么是错误显示错误日志