fix deleting notes

This commit is contained in:
azivner
2017-11-19 23:12:39 -05:00
parent aeeb35101e
commit 4c0315d2bf
3 changed files with 73 additions and 70 deletions

View File

@@ -52,11 +52,11 @@ router.put('/:noteId', async (req, res, next) => {
res.send({});
});
router.delete('/:noteId', async (req, res, next) => {
router.delete('/:noteTreeId', async (req, res, next) => {
const browserId = utils.browserId(req);
await sql.doInTransaction(async () => {
await notes.deleteNote(req.params.noteId, browserId);
await notes.deleteNote(req.params.noteTreeId, browserId);
});
res.send({});