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
|
||||
},
|
||||
order: [['createdAt', 'DESC']]
|
||||
}).then(function (revisions) {
|
||||
}).then(function (revisions: Revision[]) {
|
||||
class RevisionDataActions { // TODO: Fix Type in actions.ts
|
||||
time
|
||||
|
||||
|
@ -129,7 +129,7 @@ export class Revision extends Model<Revision> {
|
|||
}
|
||||
|
||||
const data: RevisionDataActions[] = []
|
||||
revisions.forEach(function (revision) {
|
||||
revisions.forEach(function (revision: Revision) {
|
||||
data.push({
|
||||
time: moment(revision.createdAt).valueOf(),
|
||||
length: revision.length
|
||||
|
@ -148,7 +148,7 @@ export class Revision extends Model<Revision> {
|
|||
noteId: note.id
|
||||
},
|
||||
order: [['createdAt', 'DESC']]
|
||||
}).then(function (revisions) {
|
||||
}).then(function (revisions: Revision[]) {
|
||||
if (revisions.length <= 0) {
|
||||
errorCallback(null, null)
|
||||
return
|
||||
|
@ -161,7 +161,7 @@ export class Revision extends Model<Revision> {
|
|||
[Op.gte]: time
|
||||
}
|
||||
}
|
||||
}).then(function (count) {
|
||||
}).then(function (count: number) {
|
||||
if (count <= 0) {
|
||||
errorCallback(null, null)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue