mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
Migrate historyRouter.js and baseRouter.js to TypeScript
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
0ca8e2dc7d
commit
d44144630f
3 changed files with 18 additions and 24 deletions
16
lib/web/historyRouter.ts
Normal file
16
lib/web/historyRouter.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { urlencodedParser } from './utils'
|
||||
import { History } from '../history'
|
||||
|
||||
const Router = require('express').Router
|
||||
const historyRouter = module.exports = Router()
|
||||
|
||||
// get history
|
||||
historyRouter.get('/history', History.historyGet)
|
||||
// post history
|
||||
historyRouter.post('/history', urlencodedParser, History.historyPost)
|
||||
// post history by note id
|
||||
historyRouter.post('/history/:noteId', urlencodedParser, History.historyPost)
|
||||
// delete history
|
||||
historyRouter.delete('/history', History.historyDelete)
|
||||
// delete history by note id
|
||||
historyRouter.delete('/history/:noteId', History.historyDelete)
|
Loading…
Add table
Add a link
Reference in a new issue