delete notes are now in cache as well which allows simplified update of the tree after deletion

This commit is contained in:
zadam
2019-10-26 22:50:46 +02:00
parent f82e99b5ed
commit 86a330c8c3
6 changed files with 50 additions and 62 deletions

View File

@@ -6,17 +6,17 @@ const protectedSessionService = require('../../services/protected_session');
const noteCacheService = require('../../services/note_cache');
async function getNotes(noteIds) {
// we return also deleted notes which have been specifically asked for
const notes = await sql.getManyRows(`
SELECT
noteId,
title,
isProtected,
type,
mime
FROM
notes
WHERE isDeleted = 0
AND noteId IN (???)`, noteIds);
mime,
isDeleted
FROM notes
WHERE noteId IN (???)`, noteIds);
const cssClassLabels = await sql.getManyRows(`
SELECT noteId, value FROM attributes WHERE isDeleted = 0 AND type = 'label'