event_log - entity and logging sync info

This commit is contained in:
azivner
2017-11-03 22:08:27 -04:00
parent bd71547258
commit e35c2dd4ad
10 changed files with 90 additions and 76 deletions

19
services/event_log.js Normal file
View 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
};