mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 03:58:02 -05:00
Added Types revision.ts
Signed-off-by: Yannick Bungers <git@innay.de> Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
6d256dd5b6
commit
a191448b3d
1 changed files with 4 additions and 4 deletions
|
@ -121,7 +121,7 @@ export class Revision extends Model<Revision> {
|
||||||
noteId: note.id
|
noteId: note.id
|
||||||
},
|
},
|
||||||
order: [['createdAt', 'DESC']]
|
order: [['createdAt', 'DESC']]
|
||||||
}).then(function (revisions) {
|
}).then(function (revisions: Revision[]) {
|
||||||
class RevisionDataActions { // TODO: Fix Type in actions.ts
|
class RevisionDataActions { // TODO: Fix Type in actions.ts
|
||||||
time
|
time
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ export class Revision extends Model<Revision> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const data: RevisionDataActions[] = []
|
const data: RevisionDataActions[] = []
|
||||||
revisions.forEach(function (revision) {
|
revisions.forEach(function (revision: Revision) {
|
||||||
data.push({
|
data.push({
|
||||||
time: moment(revision.createdAt).valueOf(),
|
time: moment(revision.createdAt).valueOf(),
|
||||||
length: revision.length
|
length: revision.length
|
||||||
|
@ -148,7 +148,7 @@ export class Revision extends Model<Revision> {
|
||||||
noteId: note.id
|
noteId: note.id
|
||||||
},
|
},
|
||||||
order: [['createdAt', 'DESC']]
|
order: [['createdAt', 'DESC']]
|
||||||
}).then(function (revisions) {
|
}).then(function (revisions: Revision[]) {
|
||||||
if (revisions.length <= 0) {
|
if (revisions.length <= 0) {
|
||||||
errorCallback(null, null)
|
errorCallback(null, null)
|
||||||
return
|
return
|
||||||
|
@ -161,7 +161,7 @@ export class Revision extends Model<Revision> {
|
||||||
[Op.gte]: time
|
[Op.gte]: time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).then(function (count) {
|
}).then(function (count: number) {
|
||||||
if (count <= 0) {
|
if (count <= 0) {
|
||||||
errorCallback(null, null)
|
errorCallback(null, null)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue