DEV Community

Kingsley Arinze
Kingsley Arinze

Posted on

my populate is not working correctly here, it only return the posts without the user

router.get('/get', verify, async (req, res) => {
const post = await Post.find({})
.populate("user")
.then(post => {
res.json({
status:200,
message: 'successfull post',
successfull:true,
post:post,
});
})
})

Top comments (0)