hedgedoc/lib/web/historyRouter.ts
Philip Molares fd57ed19c2
added historyRouter.ts
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:10 +02:00

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 }