mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 10:16:32 -05: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 { History } from '../history'
|
||||
import { Router } from 'express'
|
||||
|
||||
const Router = require('express').Router
|
||||
const historyRouter = module.exports = Router()
|
||||
const HistoryRouter = Router()
|
||||
|
||||
// get history
|
||||
historyRouter.get('/history', History.historyGet)
|
||||
HistoryRouter.get('/history', History.historyGet)
|
||||
// post history
|
||||
historyRouter.post('/history', urlencodedParser, History.historyPost)
|
||||
HistoryRouter.post('/history', urlencodedParser, History.historyPost)
|
||||
// post history by note id
|
||||
historyRouter.post('/history/:noteId', urlencodedParser, History.historyPost)
|
||||
HistoryRouter.post('/history/:noteId', urlencodedParser, History.historyPost)
|
||||
// delete history
|
||||
historyRouter.delete('/history', History.historyDelete)
|
||||
HistoryRouter.delete('/history', History.historyDelete)
|
||||
// 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