mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 19:47:03 -04:00
NotesService: Get note creation time from database
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
32feb5ee10
commit
65c76d0998
2 changed files with 17 additions and 3 deletions
|
@ -62,6 +62,17 @@ export class RevisionsService {
|
|||
});
|
||||
}
|
||||
|
||||
getFirstRevision(noteId: string): Promise<Revision> {
|
||||
return this.revisionRepository.findOne({
|
||||
where: {
|
||||
note: noteId,
|
||||
},
|
||||
order: {
|
||||
createdAt: 'ASC',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
toMetadataDto(revision: Revision): RevisionMetadataDto {
|
||||
return {
|
||||
id: revision.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue