mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 18:26:32 -05:00
3b36e2e0e6
Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: David Mehren <dmehren1@gmail.com>
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
import { markdownParser } from '../utils'
|
|
|
|
import { SlideController } from './slide'
|
|
import { NoteController } from './controller'
|
|
import { Router } from 'express'
|
|
|
|
const NoteRouter = Router()
|
|
// get new note
|
|
NoteRouter.get('/new', NoteController.createFromPOST)
|
|
// post new note with content
|
|
NoteRouter.post('/new', markdownParser, NoteController.createFromPOST)
|
|
// post new note with content and alias
|
|
NoteRouter.post('/new/:noteId', markdownParser, NoteController.createFromPOST)
|
|
// get publish note
|
|
NoteRouter.get('/s/:shortid', NoteController.showPublishNote)
|
|
// publish note actions
|
|
NoteRouter.get('/s/:shortid/:action', NoteController.publishNoteActions)
|
|
// get publish slide
|
|
NoteRouter.get('/p/:shortid', SlideController.showPublishSlide)
|
|
// publish slide actions
|
|
NoteRouter.get('/p/:shortid/:action', SlideController.publishSlideActions)
|
|
// get note by id
|
|
NoteRouter.get('/:noteId', NoteController.showNote)
|
|
// note actions
|
|
NoteRouter.get('/:noteId/:action', NoteController.doAction)
|
|
// note actions with action id
|
|
NoteRouter.get('/:noteId/:action/:actionId', NoteController.doAction)
|
|
|
|
export { NoteRouter }
|