uploading new image revisions, WIP

This commit is contained in:
zadam
2019-11-08 22:34:30 +01:00
parent 3149dff880
commit 712f67e983
22 changed files with 736 additions and 217 deletions

View File

@@ -373,15 +373,11 @@ async function updateNote(noteId, noteUpdates) {
note.isProtected = noteUpdates.isProtected;
await note.save();
// this might be simplified to just !== undefined
if (!['file', 'image', 'render'].includes(note.type)) {
if (noteUpdates.content !== undefined && noteUpdates.content !== null) {
noteUpdates.content = await saveLinks(note, noteUpdates.content);
await note.setContent(noteUpdates.content);
}
else if (noteUpdates.content) {
await note.setContent(noteUpdates.content);
}
if (noteTitleChanged) {
await triggerNoteTitleChanged(note);