From f47601857e9774731d5997f5c3b3256cf8bb623b Mon Sep 17 00:00:00 2001 From: Dustin Frisch Date: Thu, 11 Jan 2018 00:51:22 +0100 Subject: Allow posting new note with content Signed-off-by: Dustin Frisch --- lib/web/noteRouter.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/web/noteRouter.js') diff --git a/lib/web/noteRouter.js b/lib/web/noteRouter.js index 007c02c2..41bf5f73 100644 --- a/lib/web/noteRouter.js +++ b/lib/web/noteRouter.js @@ -4,10 +4,14 @@ const Router = require('express').Router const response = require('../response') +const {markdownParser} = require('./utils') + const noteRouter = module.exports = Router() // get new note noteRouter.get('/new', response.newNote) +// post new note with content +noteRouter.post('/new', markdownParser, response.newNote) // get publish note noteRouter.get('/s/:shortid', response.showPublishNote) // publish note actions -- cgit v1.2.3