|
@@ -31,15 +31,6 @@ module.exports = function(crowi) {
|
|
|
// next();
|
|
// next();
|
|
|
// });
|
|
// });
|
|
|
|
|
|
|
|
- revisionSchema.statics.findLatestRevision = function(path, cb) {
|
|
|
|
|
- this.find({path: path})
|
|
|
|
|
- .sort({createdAt: -1})
|
|
|
|
|
- .limit(1)
|
|
|
|
|
- .exec(function(err, data) {
|
|
|
|
|
- cb(err, data.shift());
|
|
|
|
|
- });
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
revisionSchema.statics.findRevisions = function(ids) {
|
|
revisionSchema.statics.findRevisions = function(ids) {
|
|
|
const Revision = this,
|
|
const Revision = this,
|
|
|
User = crowi.model('User');
|
|
User = crowi.model('User');
|
|
@@ -141,8 +132,5 @@ module.exports = function(crowi) {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- revisionSchema.statics.updatePath = function(pathName) {
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
return mongoose.model('Revision', revisionSchema);
|
|
return mongoose.model('Revision', revisionSchema);
|
|
|
};
|
|
};
|