simplified updating note content

This commit is contained in:
zadam
2022-06-13 22:38:59 +02:00
parent 7edcd5d746
commit 4cec856e21
12 changed files with 23 additions and 51 deletions

View File

@@ -21,7 +21,7 @@ function updateFile(req) {
return [404, `Note ${noteId} doesn't exist.`];
}
noteRevisionService.createNoteRevision(note);
note.saveNoteRevision();
note.mime = file.mimetype.toLowerCase();
note.save();
@@ -30,8 +30,6 @@ function updateFile(req) {
note.setLabel('originalFileName', file.originalname);
noteRevisionService.protectNoteRevisions(note);
return {
uploaded: true
};