cloning in context menu (copy & paste) and a lot of related refactoring and fixes

This commit is contained in:
azivner
2017-11-22 23:16:54 -05:00
parent c1fca4764b
commit acba72ec4c
12 changed files with 260 additions and 188 deletions

View File

@@ -29,12 +29,12 @@ router.get('/:noteId', auth.checkApiAuth, async (req, res, next) => {
});
});
router.post('/:parentNoteTreeId/children', async (req, res, next) => {
const parentNoteTreeId = req.params.parentNoteTreeId;
router.post('/:parentNoteId/children', async (req, res, next) => {
const parentNoteId = req.params.parentNoteId;
const browserId = utils.browserId(req);
const note = req.body;
const { noteId, noteTreeId } = await notes.createNewNote(parentNoteTreeId, note, browserId);
const { noteId, noteTreeId } = await notes.createNewNote(parentNoteId, note, browserId);
res.send({
'note_id': noteId,