mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-30 15:21:01 -05:00
37923d11f8
Before this patch the non-TypeScript version of the slide mode causes problems with the TypeScript code. Therefore, in order to get things working, this patch does minimalistic changes to the slide mode controller to bring it into TypeScript convention. And unbreak slide mode. Further changes are required, but this gets slide mode back to a usable state. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
27 lines
1 KiB
TypeScript
27 lines
1 KiB
TypeScript
import {markdownParser} from "../utils";
|
|
|
|
import {SlideController} 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', SlideController.showPublishSlide);
|
|
// publish slide actions
|
|
router.get('/p/:shortid/:action', SlideController.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);
|