2017-04-11 21:48:55 +00:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const Router = require('express').Router
|
|
|
|
|
2019-05-30 22:27:56 +00:00
|
|
|
const { urlencodedParser } = require('./utils')
|
2017-04-12 16:20:28 +00:00
|
|
|
const history = require('../history')
|
2017-04-11 21:48:55 +00:00
|
|
|
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)
|