api: update mongoose
This commit is contained in:
parent
c7202eadd2
commit
e52575ab87
|
@ -40,7 +40,7 @@
|
|||
"luxon": "^1.26.0",
|
||||
"method-override": "3.0.0",
|
||||
"methods": "1.1.2",
|
||||
"mongoose": "^5.11.17",
|
||||
"mongoose": "^6.0.5",
|
||||
"mongoose-data-migrate": "flashstockinc/mongoose-data-migrate",
|
||||
"mongoose-unique-validator": "2.0.3",
|
||||
"morgan": "1.10.0",
|
||||
|
|
|
@ -148,7 +148,7 @@ class Track extends mongoose.Model {
|
|||
}
|
||||
|
||||
async generateFilePath() {
|
||||
await this.populate('author').execPopulate();
|
||||
await this.populate('author');
|
||||
this.filePath = path.join(this.author.username, this.slug);
|
||||
}
|
||||
|
||||
|
|
|
@ -310,8 +310,7 @@ router.get(
|
|||
createdAt: 'asc',
|
||||
},
|
||||
},
|
||||
})
|
||||
.execPopulate();
|
||||
});
|
||||
|
||||
return res.json({
|
||||
comments: req.track.comments.map(function (comment) {
|
||||
|
|
Loading…
Reference in a new issue