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:
David Mehren 2020-09-22 17:34:33 +02:00
parent 21f4cda27c
commit 5d1cc6c339
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 31 additions and 34 deletions

View file

@ -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')