|
|
@@ -30,6 +30,13 @@ module.exports = function(crowi) {
|
|
|
});
|
|
|
revisionSchema.plugin(mongoosePaginate);
|
|
|
|
|
|
+ revisionSchema.statics.findRevisionIdList = function(path) {
|
|
|
+ return this.find({ path })
|
|
|
+ .select('_id author createdAt hasDiffToPrev')
|
|
|
+ .sort({ createdAt: -1 })
|
|
|
+ .exec();
|
|
|
+ };
|
|
|
+
|
|
|
revisionSchema.statics.updateRevisionListByPath = async function(path, updateData) {
|
|
|
const Revision = this;
|
|
|
|