mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-06 08:31:05 +00:00
f6eec0ce90
Signed-off-by: David Mehren <dmehren1@gmail.com>
27 lines
1 KiB
TypeScript
27 lines
1 KiB
TypeScript
import {markdownParser} from "../utils";
|
|
|
|
import slide from "./slide";
|
|
import {NoteController} from "./controller";
|
|
import {Router} from "express";
|
|
|
|
const router = module.exports = Router();
|
|
// get new note
|
|
router.get('/new', NoteController.createFromPOST);
|
|
// post new note with content
|
|
router.post('/new', markdownParser, NoteController.createFromPOST);
|
|
// post new note with content and alias
|
|
router.post('/new/:noteId', markdownParser, NoteController.createFromPOST);
|
|
// get publish note
|
|
router.get('/s/:shortid', NoteController.showPublishNote);
|
|
// publish note actions
|
|
router.get('/s/:shortid/:action', NoteController.publishNoteActions);
|
|
// get publish slide
|
|
router.get('/p/:shortid', slide.showPublishSlide);
|
|
// publish slide actions
|
|
router.get('/p/:shortid/:action', slide.publishSlideActions);
|
|
// get note by id
|
|
router.get('/:noteId', NoteController.showNote);
|
|
// note actions
|
|
router.get('/:noteId/:action', NoteController.doAction);
|
|
// note actions with action id
|
|
router.get('/:noteId/:action/:actionId', NoteController.doAction);
|