saving attachments when editing

This commit is contained in:
zadam
2023-01-24 09:19:49 +01:00
parent f59e19d93b
commit c474e65cae
9 changed files with 43 additions and 25 deletions

View File

@@ -53,11 +53,11 @@ function createNote(req) {
};
}
function updateNoteContent(req) {
const {content} = req.body;
function updateNoteData(req) {
const {content, attachments} = req.body;
const {noteId} = req.params;
return noteService.updateNoteContent(noteId, content);
return noteService.updateNoteData(noteId, content, attachments);
}
function deleteNote(req) {
@@ -327,7 +327,7 @@ function forceSaveNoteRevision(req) {
module.exports = {
getNote,
updateNoteContent,
updateNoteData,
deleteNote,
undeleteNote,
createNote,