fix potential bugs that may exist in getRevisions

This commit is contained in:
SiriusXT 2024-09-15 10:51:55 +08:00
parent cd547ebdaf
commit 62a884cb5a

View File

@ -1109,7 +1109,7 @@ class BNote extends AbstractBeccaEntity<BNote> {
} }
getRevisions(): BRevision[] { getRevisions(): BRevision[] {
return sql.getRows<RevisionRow>("SELECT * FROM revisions WHERE noteId = ?", [this.noteId]) return sql.getRows<RevisionRow>("SELECT * FROM revisions WHERE noteId = ? ORDER BY revisions.utcDateCreated ASC", [this.noteId])
.map(row => new BRevision(row)); .map(row => new BRevision(row));
} }