mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
Convert first files to TypeScript
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
0d788e0aec
commit
f6eec0ce90
7 changed files with 301 additions and 294 deletions
27
lib/web/note/router.ts
Normal file
27
lib/web/note/router.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
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);
|
Loading…
Add table
Add a link
Reference in a new issue