mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 10:16:32 -05:00
fixed lib/web/note/router.ts
Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
46774282cc
commit
3b36e2e0e6
1 changed files with 17 additions and 15 deletions
|
@ -1,27 +1,29 @@
|
|||
import {markdownParser} from "../utils";
|
||||
import { markdownParser } from '../utils'
|
||||
|
||||
import {SlideController} from "./slide";
|
||||
import {NoteController} from "./controller";
|
||||
import {Router} from "express";
|
||||
import { SlideController } from './slide'
|
||||
import { NoteController } from './controller'
|
||||
import { Router } from 'express'
|
||||
|
||||
const router = module.exports = Router();
|
||||
const NoteRouter = Router()
|
||||
// get new note
|
||||
router.get('/new', NoteController.createFromPOST);
|
||||
NoteRouter.get('/new', NoteController.createFromPOST)
|
||||
// post new note with content
|
||||
router.post('/new', markdownParser, NoteController.createFromPOST);
|
||||
NoteRouter.post('/new', markdownParser, NoteController.createFromPOST)
|
||||
// post new note with content and alias
|
||||
router.post('/new/:noteId', markdownParser, NoteController.createFromPOST);
|
||||
NoteRouter.post('/new/:noteId', markdownParser, NoteController.createFromPOST)
|
||||
// get publish note
|
||||
router.get('/s/:shortid', NoteController.showPublishNote);
|
||||
NoteRouter.get('/s/:shortid', NoteController.showPublishNote)
|
||||
// publish note actions
|
||||
router.get('/s/:shortid/:action', NoteController.publishNoteActions);
|
||||
NoteRouter.get('/s/:shortid/:action', NoteController.publishNoteActions)
|
||||
// get publish slide
|
||||
router.get('/p/:shortid', SlideController.showPublishSlide);
|
||||
NoteRouter.get('/p/:shortid', SlideController.showPublishSlide)
|
||||
// publish slide actions
|
||||
router.get('/p/:shortid/:action', SlideController.publishSlideActions);
|
||||
NoteRouter.get('/p/:shortid/:action', SlideController.publishSlideActions)
|
||||
// get note by id
|
||||
router.get('/:noteId', NoteController.showNote);
|
||||
NoteRouter.get('/:noteId', NoteController.showNote)
|
||||
// note actions
|
||||
router.get('/:noteId/:action', NoteController.doAction);
|
||||
NoteRouter.get('/:noteId/:action', NoteController.doAction)
|
||||
// note actions with action id
|
||||
router.get('/:noteId/:action/:actionId', NoteController.doAction);
|
||||
NoteRouter.get('/:noteId/:action/:actionId', NoteController.doAction)
|
||||
|
||||
export { NoteRouter }
|
||||
|
|
Loading…
Reference in a new issue