consistent checking of is_deleted, some small refactorings

This commit is contained in:
azivner
2018-01-03 22:13:02 -05:00
parent 353a9b24c1
commit 07c33979c3
7 changed files with 32 additions and 22 deletions

View File

@@ -112,7 +112,7 @@ router.get('/notes_reordering/:noteTreeParentId', auth.checkApiAuth, async (req,
res.send({
parent_note_id: noteTreeParentId,
ordering: await sql.getMap("SELECT note_tree_id, note_position FROM notes_tree WHERE parent_note_id = ?", [noteTreeParentId])
ordering: await sql.getMap("SELECT note_tree_id, note_position FROM notes_tree WHERE parent_note_id = ? AND is_deleted = 0", [noteTreeParentId])
});
});