diff --git a/node/routes/tree.js b/node/routes/tree.js index d9cb4ddae..dda03878d 100644 --- a/node/routes/tree.js +++ b/node/routes/tree.js @@ -29,7 +29,7 @@ router.get('/', auth.checkApiAuth, async (req, res, next) => { root_notes.push(note); } - notes_map[note['note_id']] = note + notes_map[note['note_id']] = note; } for (const note of notes) { diff --git a/node/utils.js b/node/utils.js index 5203f686f..7bd53a02e 100644 --- a/node/utils.js +++ b/node/utils.js @@ -19,7 +19,7 @@ function randomString(length, chars) { } function nowTimestamp() { - return Date.now(); + return Date.now() / 1000; } function toBase64(plainText) {