mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
NotesService: Find note by ID or alias in database
This commit also introduces the `getNoteDtoByIdOrAlias` method, that converts a `Note` entity to a `NoteDto` Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
21f4cda27c
commit
5d1cc6c339
2 changed files with 31 additions and 34 deletions
|
@ -48,7 +48,7 @@ export class NotesController {
|
|||
|
||||
@Get(':noteIdOrAlias')
|
||||
getNote(@Param('noteIdOrAlias') noteIdOrAlias: string) {
|
||||
return this.noteService.getNoteByIdOrAlias(noteIdOrAlias);
|
||||
return this.noteService.getNoteDtoByIdOrAlias(noteIdOrAlias);
|
||||
}
|
||||
|
||||
@Post(':noteAlias')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue