mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
event_log - entity and logging sync info
This commit is contained in:
19
services/event_log.js
Normal file
19
services/event_log.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const sql = require('./sql');
|
||||
const utils = require('./utils');
|
||||
|
||||
async function addEvent(comment) {
|
||||
await addNoteEvent(null, comment);
|
||||
}
|
||||
|
||||
async function addNoteEvent(noteId, comment) {
|
||||
await sql.insert('event_log', {
|
||||
note_id : noteId,
|
||||
comment: comment,
|
||||
date_added: utils.nowTimestamp()
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
addEvent,
|
||||
addNoteEvent
|
||||
};
|
||||
Reference in New Issue
Block a user