mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 12:08: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)
|
return callback(err, null)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
checkAllNotesRevision (callback) {
|
static checkAllNotesRevision (callback) {
|
||||||
this.saveAllNotesRevision(function (err, notes) {
|
this.saveAllNotesRevision(function (err, notes) {
|
||||||
if (err) return callback(err, null)
|
if (err) return callback(err, null)
|
||||||
if (!notes || notes.length <= 0) {
|
if (!notes || notes.length <= 0) {
|
||||||
|
@ -161,8 +161,8 @@ export class Revision extends Model<Revision> {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
saveAllNotesRevision (callback) {
|
static saveAllNotesRevision (callback) {
|
||||||
Sequelize.models.Note.findAll({
|
Note.findAll({
|
||||||
// query all notes that need to save for revision
|
// query all notes that need to save for revision
|
||||||
where: {
|
where: {
|
||||||
[Op.and]: [
|
[Op.and]: [
|
||||||
|
|
Loading…
Reference in a new issue