mirror of
https://github.com/zadam/trilium.git
synced 2024-11-12 18:54:49 +08:00
22 lines
No EOL
460 B
JavaScript
22 lines
No EOL
460 B
JavaScript
const sql = require('./sql');
|
|
const utils = require('./utils');
|
|
const log = require('./log');
|
|
|
|
async function addEvent(comment) {
|
|
await addNoteEvent(null, comment);
|
|
}
|
|
|
|
async function addNoteEvent(noteId, comment) {
|
|
await sql.insert('event_log', {
|
|
noteId : noteId,
|
|
comment: comment,
|
|
dateAdded: utils.nowDate()
|
|
});
|
|
|
|
log.info("Event log for " + noteId + ": " + comment);
|
|
}
|
|
|
|
module.exports = {
|
|
addEvent,
|
|
addNoteEvent
|
|
}; |