mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 12:08:02 -05:00
7b9f9a487b
Signed-off-by: David Mehren <git@herrmehren.de>
18 lines
595 B
TypeScript
18 lines
595 B
TypeScript
import { urlencodedParser } from './utils'
|
|
import { History } from '../history'
|
|
import { Router } from 'express'
|
|
|
|
const HistoryRouter = 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)
|
|
|
|
export { HistoryRouter }
|