mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
moved all sources to src directory
This commit is contained in:
22
src/services/event_log.js
Normal file
22
src/services/event_log.js
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
};
|
||||
Reference in New Issue
Block a user