recent notes are now keyed by note tree id which simplifies things

This commit is contained in:
azivner
2017-12-03 10:06:53 -05:00
parent 41f089b3f4
commit 15faefe8a3
10 changed files with 36 additions and 54 deletions

View File

@@ -66,10 +66,10 @@ router.get('/notes_reordering/:noteTreeParentId', auth.checkApiAuth, async (req,
});
});
router.get('/recent_notes/:notePath', auth.checkApiAuth, async (req, res, next) => {
const notePath = req.params.notePath;
router.get('/recent_notes/:noteTreeId', auth.checkApiAuth, async (req, res, next) => {
const noteTreeId = req.params.noteTreeId;
res.send(await sql.getSingleResult("SELECT * FROM recent_notes WHERE note_path = ?", [notePath]));
res.send(await sql.getSingleResult("SELECT * FROM recent_notes WHERE note_tree_id = ?", [noteTreeId]));
});
router.put('/notes', auth.checkApiAuth, async (req, res, next) => {