loginmodel.find(
{ username: username },
async (err, data) => {
console.log(data.map(doc => doc.map).sort()) // this right here
为什么我得到 [] 的输出?我的mongodb数据:
{"_id":{"$oid":"5fc6ba1b5856df47d4202b7c"},"date":"Tue Dec 01 2020 16:48:11 GMT-0500 (Eastern Standard Time)","username":"cheslin23t","password":"2713ee2f3d2672c3d5cfce16f59fcf14","__v":{"$numberInt":"0"}}
哦,我的数据库密码不正确,我今天才发现:)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句