moved all sources to src directory

This commit is contained in:
azivner
2018-01-28 22:18:14 -05:00
parent 669d189ab7
commit 52ad7f64b4
468 changed files with 18 additions and 17 deletions

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