mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
separate DB connection for each transaction (just for the record, will be reverted probably)
This commit is contained in:
@@ -25,10 +25,10 @@ router.get('/:noteId', auth.checkApiAuth, async (req, res, next) => {
|
||||
});
|
||||
|
||||
router.put('', auth.checkApiAuth, async (req, res, next) => {
|
||||
await sql.doInTransaction(async () => {
|
||||
await sql.replace("notes_history", req.body);
|
||||
await sql.doInTransaction(async db => {
|
||||
await sql.replace(db, "notes_history", req.body);
|
||||
|
||||
await sync_table.addNoteHistorySync(req.body.note_history_id);
|
||||
await sync_table.addNoteHistorySync(db, req.body.note_history_id);
|
||||
});
|
||||
|
||||
res.send();
|
||||
|
||||
Reference in New Issue
Block a user