Mongoose, NODE JS returns undefined but the correct data is collected within the findOne

前端 未结 0 855
逝去的感伤
逝去的感伤 2021-02-01 05:41

Currently trying to get one user\'s data from my MongoDB database. But the function results in receiving undefined.

function getIntro(req){
  user.findOne({ id: r         


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