summaryrefslogtreecommitdiff
path: root/lib/web/noteRouter.js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-01-20 19:45:41 +0100
committerGitHub2018-01-20 19:45:41 +0100
commit268c81a3233c1407d6f6cf675e51bed97d8f4615 (patch)
tree62e8f8125b89844dfa97acfa534264be30e82b36 /lib/web/noteRouter.js
parent5d9a2c35698eeb7c29dc0b0b600dad4c6726528a (diff)
parentf47601857e9774731d5997f5c3b3256cf8bb623b (diff)
Merge pull request #673 from fooker/master
Allow posting new note with content
Diffstat (limited to '')
-rw-r--r--lib/web/noteRouter.js4
1 files changed, 4 insertions, 0 deletions
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