Imp: filter out __v

This commit is contained in:
Manish 2023-03-29 14:59:24 +11:00
parent d84f12f4ea
commit cac28d59ed

View File

@ -141,7 +141,7 @@ app.get("/api/users/:_id/logs", (req, res) => {
const _id = req.params._id; const _id = req.params._id;
exerciseLogs exerciseLogs
.findById(_id) .findById(_id)
.select({ "logs._id": false }) .select({ "logs._id": false, __v: false })
.then((excLogs) => { .then((excLogs) => {
if (excLogs) { if (excLogs) {
let excLogsJson = excLogs.toJSON(); let excLogsJson = excLogs.toJSON();