Imp: filter out __v
This commit is contained in:
parent
d84f12f4ea
commit
cac28d59ed
2
index.js
2
index.js
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user