note cache fixes for created notes

This commit is contained in:
zadam
2020-05-13 23:06:13 +02:00
parent 7992f32d34
commit a287bb59ea
4 changed files with 71 additions and 46 deletions

View File

@@ -109,11 +109,17 @@ async function addImagesToNote(images, note, content) {
const {note: imageNote, url} = await imageService.saveImage(note.noteId, buffer, filename, true);
await new Attribute({
noteId: imageNote.noteId,
type: 'label',
name: 'hideInAutocomplete'
}).save();
await new Attribute({
noteId: note.noteId,
type: 'relation',
value: imageNote.noteId,
name: 'imageLink'
name: 'imageLink',
value: imageNote.noteId
}).save();
console.log(`Replacing ${imageId} with ${url}`);
@@ -155,4 +161,4 @@ module.exports = {
addClipping,
openNote,
handshake
};
};