mongodb-collection-query-with-mongose
v2.0.4
Published
This is use to query a single mongodb collection written with mongoose dynamically with simple query parameters using mongodb query types 'AND' and 'OR' with mongodb filter options eg '$gt' as 'gt', '$gte' as 'gte', '$lt' as 'lt', '$lte' as 'lte', '$eq'
Downloads
35
Maintainers
Readme
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(data[0])
});