Mongoose model.exists not returning Boolean while using _id

前端 未结 0 770
醉话见心
醉话见心 2020-12-19 01:34

I\'m trying to figure it out, why mongoose is not returning boolean while using User.exists({_id: id});

let userExists = await User.exists({id: id}

相关标签:
回答
  • 消灭零回复
提交回复
热议问题