From a5020719e4e1e7b8917ef472d0a457e4bb474fa2 Mon Sep 17 00:00:00 2001 From: azivner Date: Mon, 23 Oct 2017 19:01:37 -0400 Subject: [PATCH] fixed adding new note --- routes/api/notes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/api/notes.js b/routes/api/notes.js index f32ffd91c..889e02725 100644 --- a/routes/api/notes.js +++ b/routes/api/notes.js @@ -161,6 +161,8 @@ router.post('/:parentNoteId/children', async (req, res, next) => { throw new ('Unknown target: ' + note['target']); } + await sql.beginTransaction(); + await sql.addAudit(audit_category.CREATE_NOTE, req, noteId); const now = utils.nowTimestamp(); @@ -172,8 +174,6 @@ router.post('/:parentNoteId/children', async (req, res, next) => { 'note_clone_id': '', 'date_created': now, 'date_modified': now, - 'icon_info': 'pencil', - 'is_finished': 0, 'encryption': note['encryption'] });