|
|
@@ -91,7 +91,7 @@ module.exports = function(crowi) {
|
|
|
};
|
|
|
|
|
|
revisionSchema.statics.findLatestRevisionByPathPopulatedWithAuthor = async function(path) {
|
|
|
- return (await this.find({ path }).sort({ createdAt: -1 }).limit(1).populate('author'))[0];
|
|
|
+ return (await this.find({ path }).sort({ createdAt: -1 }).limit(1).populate('author', 'name createdAt imageUrlCached'))[0];
|
|
|
};
|
|
|
|
|
|
return mongoose.model('Revision', revisionSchema);
|