mirror of
https://github.com/zadam/trilium.git
synced 2025-09-12 01:25:14 +08:00
fixed adding new note
This commit is contained in:
parent
a5bd4c7b6a
commit
a5020719e4
1 changed files with 2 additions and 2 deletions
|
@ -161,6 +161,8 @@ router.post('/:parentNoteId/children', async (req, res, next) => {
|
||||||
throw new ('Unknown target: ' + note['target']);
|
throw new ('Unknown target: ' + note['target']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await sql.beginTransaction();
|
||||||
|
|
||||||
await sql.addAudit(audit_category.CREATE_NOTE, req, noteId);
|
await sql.addAudit(audit_category.CREATE_NOTE, req, noteId);
|
||||||
|
|
||||||
const now = utils.nowTimestamp();
|
const now = utils.nowTimestamp();
|
||||||
|
@ -172,8 +174,6 @@ router.post('/:parentNoteId/children', async (req, res, next) => {
|
||||||
'note_clone_id': '',
|
'note_clone_id': '',
|
||||||
'date_created': now,
|
'date_created': now,
|
||||||
'date_modified': now,
|
'date_modified': now,
|
||||||
'icon_info': 'pencil',
|
|
||||||
'is_finished': 0,
|
|
||||||
'encryption': note['encryption']
|
'encryption': note['encryption']
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue