mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
NotesService: Replace noteByIdOrAlias with note as parameter
As the NotesController has the note already, because it checked with it if the user has the permission to perform the action, it's not necessary to get the note from the DB again, instead we should just provide the note to the functions directly. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
e538056252
commit
4d89ffd474
5 changed files with 50 additions and 107 deletions
|
@ -206,7 +206,7 @@ describe('Notes', () => {
|
|||
// wait one second
|
||||
await new Promise((r) => setTimeout(r, 1000));
|
||||
// update the note
|
||||
await notesService.updateNoteByIdOrAlias('test5a', 'More test content');
|
||||
await notesService.updateNote(note, 'More test content');
|
||||
const metadata = await request(app.getHttpServer())
|
||||
.get('/notes/test5a/metadata')
|
||||
.expect(200);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue