mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-20 07:11:16 +00:00
added historyRouter.ts
Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
621905bc97
commit
fd57ed19c2
1 changed files with 9 additions and 7 deletions
|
@ -1,16 +1,18 @@
|
||||||
import { urlencodedParser } from './utils'
|
import { urlencodedParser } from './utils'
|
||||||
import { History } from '../history'
|
import { History } from '../history'
|
||||||
|
import { Router } from 'express'
|
||||||
|
|
||||||
const Router = require('express').Router
|
const HistoryRouter = Router()
|
||||||
const historyRouter = module.exports = Router()
|
|
||||||
|
|
||||||
// get history
|
// get history
|
||||||
historyRouter.get('/history', History.historyGet)
|
HistoryRouter.get('/history', History.historyGet)
|
||||||
// post history
|
// post history
|
||||||
historyRouter.post('/history', urlencodedParser, History.historyPost)
|
HistoryRouter.post('/history', urlencodedParser, History.historyPost)
|
||||||
// post history by note id
|
// post history by note id
|
||||||
historyRouter.post('/history/:noteId', urlencodedParser, History.historyPost)
|
HistoryRouter.post('/history/:noteId', urlencodedParser, History.historyPost)
|
||||||
// delete history
|
// delete history
|
||||||
historyRouter.delete('/history', History.historyDelete)
|
HistoryRouter.delete('/history', History.historyDelete)
|
||||||
// delete history by note id
|
// delete history by note id
|
||||||
historyRouter.delete('/history/:noteId', History.historyDelete)
|
HistoryRouter.delete('/history/:noteId', History.historyDelete)
|
||||||
|
|
||||||
|
export { HistoryRouter }
|
||||||
|
|
Loading…
Reference in a new issue