so I already have the data in Mongo, but the problem is the Mongo doesn't read properly the data from the backend. This is my backend code:
app.get ('/posts', async (req , res) => {
let db = await connect();
let posts = req.body;
res.send(posts);
});
and the code from services:
async get_posts() {
let response = await Service.get(/posts)
let doc = response.doc;
return {
id: doc._id,
email: doc.email,
title: doc.title,
imageDesc: doc.imageDesc,
img: doc.img,
};
}