mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
RevisionsService: Refactor getFirst/LastRevision
The functions now expect a `Note` object instead of a noteId to make it more consistent with other functions. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
fe26f1689c
commit
5ecb0c0694
2 changed files with 8 additions and 8 deletions
|
@ -129,7 +129,7 @@ export class NotesService {
|
|||
* @return {Revision} the first revision of the note
|
||||
*/
|
||||
async getLatestRevision(note: Note): Promise<Revision> {
|
||||
return await this.revisionsService.getLatestRevision(note.id);
|
||||
return await this.revisionsService.getLatestRevision(note);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -139,7 +139,7 @@ export class NotesService {
|
|||
* @return {Revision} the last revision of the note
|
||||
*/
|
||||
async getFirstRevision(note: Note): Promise<Revision> {
|
||||
return await this.revisionsService.getFirstRevision(note.id);
|
||||
return await this.revisionsService.getFirstRevision(note);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue