2.0.4 • Published 5 years ago
mongodb-collection-query-with-mongose v2.0.4
router.get("/post", authGaurd, async (req, res) => {
const setect = "_id title userId description imageUrl"
const data = await Promise.all( getResReq(req, res, Post, select) );
if (data.type === "error") return res.status(500).send({ message : internal server error
, error: data})
res.send(data0)
});