mirror of
https://github.com/zadam/trilium.git
synced 2024-09-22 00:26:01 +08:00
22 lines
483 B
JavaScript
22 lines
483 B
JavaScript
const sql = require('./sql');
|
|
const utils = require('./utils');
|
|
const log = require('./log');
|
|
|
|
async function addEvent(db, comment) {
|
|
await addNoteEvent(db, null, comment);
|
|
}
|
|
|
|
async function addNoteEvent(db, noteId, comment) {
|
|
await sql.insert(db, 'event_log', {
|
|
note_id : noteId,
|
|
comment: comment,
|
|
date_added: utils.nowTimestamp()
|
|
});
|
|
|
|
log.info("Event log for " + noteId + ": " + comment);
|
|
}
|
|
|
|
module.exports = {
|
|
addEvent,
|
|
addNoteEvent
|
|
}; |