added new "create note" button

This commit is contained in:
zadam
2020-11-27 22:21:13 +01:00
parent 2a54ce803e
commit b0217ee04c
7 changed files with 31 additions and 9 deletions

View File

@@ -4,6 +4,12 @@ const dateNoteService = require('../../services/date_notes');
const sql = require('../../services/sql');
const dateUtils = require('../../services/date_utils');
const noteService = require('../../services/notes');
const attributeService = require('../../services/attributes');
function getInboxNote(req) {
return attributeService.getNoteWithLabel('inbox')
|| dateNoteService.getDateNote(req.params.date);
}
function getDateNote(req) {
return dateNoteService.getDateNote(req.params.date);
@@ -68,6 +74,7 @@ function createSearchNote() {
}
module.exports = {
getInboxNote,
getDateNote,
getMonthNote,
getYearNote,

View File

@@ -186,6 +186,7 @@ function register(app) {
apiRoute(POST, '/api/notes/:noteId/link-map', linkMapRoute.getLinkMap);
apiRoute(GET, '/api/date-notes/inbox/:date', dateNotesRoute.getInboxNote);
apiRoute(GET, '/api/date-notes/date/:date', dateNotesRoute.getDateNote);
apiRoute(GET, '/api/date-notes/month/:month', dateNotesRoute.getMonthNote);
apiRoute(GET, '/api/date-notes/year/:year', dateNotesRoute.getYearNote);