mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 03:58:02 -05:00
More static methods in revision.ts
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
0c078f5266
commit
4e02f46cee
1 changed files with 3 additions and 3 deletions
|
@ -151,7 +151,7 @@ export class Revision extends Model<Revision> {
|
|||
return callback(err, null)
|
||||
})
|
||||
}
|
||||
checkAllNotesRevision (callback) {
|
||||
static checkAllNotesRevision (callback) {
|
||||
this.saveAllNotesRevision(function (err, notes) {
|
||||
if (err) return callback(err, null)
|
||||
if (!notes || notes.length <= 0) {
|
||||
|
@ -161,8 +161,8 @@ export class Revision extends Model<Revision> {
|
|||
}
|
||||
})
|
||||
}
|
||||
saveAllNotesRevision (callback) {
|
||||
Sequelize.models.Note.findAll({
|
||||
static saveAllNotesRevision (callback) {
|
||||
Note.findAll({
|
||||
// query all notes that need to save for revision
|
||||
where: {
|
||||
[Op.and]: [
|
||||
|
|
Loading…
Reference in a new issue