diff options
author | Erik Michelson | 2019-09-04 20:25:32 +0200 |
---|---|---|
committer | Erik Michelson | 2019-09-04 20:25:32 +0200 |
commit | 6e5e6696ad5c336be700641caf94676a281fc181 (patch) | |
tree | 715abe90f09c839698a5e8f42329f94bb6b1eee8 /lib/web/note | |
parent | 8d29d74b02fb07be8efaae002fca9b9033c536f0 (diff) |
Refactored note-creation with given noteId
Known bugs/features:
- pushing towards an existing note results in an error 500
Signed-off-by: Erik Michelson <erik@liltv.de>
Diffstat (limited to '')
-rw-r--r-- | lib/web/noteRouter.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/web/noteRouter.js b/lib/web/noteRouter.js index 78cb69e5..58e93019 100644 --- a/lib/web/noteRouter.js +++ b/lib/web/noteRouter.js @@ -9,11 +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/:alias', markdownParser, response.newNote) +noteRouter.post('/new/:noteId', markdownParser, response.postNote) // get publish note noteRouter.get('/s/:shortid', response.showPublishNote) // publish note actions |