mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
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>
This commit is contained in:
parent
8d29d74b02
commit
6e5e6696ad
2 changed files with 18 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue