event log now shows full path of notes and works with encryption

This commit is contained in:
azivner 2017-11-04 11:44:42 -04:00
parent ee07d2d2d8
commit 869bccea18
2 changed files with 2 additions and 4 deletions

View File

@ -20,7 +20,7 @@ async function showEventLog() {
if (event.note_id) { if (event.note_id) {
const noteLink = $("<a>", { const noteLink = $("<a>", {
href: 'app#' + event.note_id, href: 'app#' + event.note_id,
text: event.note_title text: getFullName(event.note_id)
}).prop('outerHTML'); }).prop('outerHTML');
console.log(noteLink); console.log(noteLink);
@ -30,7 +30,6 @@ async function showEventLog() {
const eventEl = $('<li>').html(dateTime + " - " + event.comment); const eventEl = $('<li>').html(dateTime + " - " + event.comment);
eventLogList.append(eventEl); eventLogList.append(eventEl);
} }
} }

View File

@ -7,8 +7,7 @@ const sql = require('../../services/sql');
router.get('', async (req, res, next) => { router.get('', async (req, res, next) => {
await deleteOld(); await deleteOld();
const result = await sql.getResults("SELECT e.id, e.note_id, e.comment, e.date_added, n.note_title " + const result = await sql.getResults("SELECT * FROM event_log ORDER BY date_added DESC");
"FROM event_log e LEFT JOIN notes n ON e.note_id = n.note_id ORDER BY date_added DESC");
res.send(result); res.send(result);
}); });