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