mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 09:04:44 -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
c9b05b3c44
commit
5f49cb8d48
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