changing title directly from relation map

This commit is contained in:
azivner
2018-10-30 22:18:20 +01:00
parent f33f99134b
commit 639284fd85
6 changed files with 38 additions and 6 deletions

View File

@@ -222,6 +222,10 @@ async function saveNoteRevision(note) {
async function updateNote(noteId, noteUpdates) {
const note = await repository.getNote(noteId);
if (!note.isContentAvailable) {
throw new Error(`Note ${noteId} is not available for change!`);
}
if (note.type === 'file') {
// for update file, newNote doesn't contain file payloads
noteUpdates.content = note.content;