summaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
authorSheogorath2019-09-26 12:20:57 +0200
committerGitHub2019-09-26 12:20:57 +0200
commite313b47b922508ea49933de471b619a7b15acf82 (patch)
treed59cee6d96e085e2573c219334ed7c31dd8837ab /lib/web
parent7f69ec5bcab4cb15ff6cf934224c9b724ae0491c (diff)
parent6e5e6696ad5c336be700641caf94676a281fc181 (diff)
Merge pull request #170 from ErikMichelson/post-note-url
Added endpoint for note-creation with given alias
Diffstat (limited to '')
-rw-r--r--lib/web/noteRouter.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/web/noteRouter.js b/lib/web/noteRouter.js
index bac2cf88..58e93019 100644
--- a/lib/web/noteRouter.js
+++ b/lib/web/noteRouter.js
@@ -9,9 +9,11 @@ const { markdownParser } = require('./utils')
const noteRouter = module.exports = Router()
// get new note
-noteRouter.get('/new', response.newNote)
+noteRouter.get('/new', response.postNote)
// post new note with content
-noteRouter.post('/new', markdownParser, response.newNote)
+noteRouter.post('/new', markdownParser, response.postNote)
+// post new note with content and alias
+noteRouter.post('/new/:noteId', markdownParser, response.postNote)
// get publish note
noteRouter.get('/s/:shortid', response.showPublishNote)
// publish note actions