mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
synchronization of transactions using promise so only one can be active
This commit is contained in:
@@ -2,12 +2,12 @@ const sql = require('./sql');
|
||||
const utils = require('./utils');
|
||||
const log = require('./log');
|
||||
|
||||
async function addEvent(db, comment) {
|
||||
await addNoteEvent(db, null, comment);
|
||||
async function addEvent(comment) {
|
||||
await addNoteEvent(null, comment);
|
||||
}
|
||||
|
||||
async function addNoteEvent(db, noteId, comment) {
|
||||
await sql.insert(db, 'event_log', {
|
||||
async function addNoteEvent(noteId, comment) {
|
||||
await sql.insert('event_log', {
|
||||
note_id : noteId,
|
||||
comment: comment,
|
||||
date_added: utils.nowTimestamp()
|
||||
|
||||
Reference in New Issue
Block a user