summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorBoHong Li2017-04-12 05:48:55 +0800
committerRaccoon Li2017-05-08 19:24:38 +0800
commit706df11e2356bd7548bfa14316e86111b7ba9d90 (patch)
tree592d263ec6716d763a66ac794d5cd44a23dc3934 /app.js
parentc99ae8e1f88f53739e781d20ecfd394264208e51 (diff)
refactor(app.js): Extract history api
Diffstat (limited to 'app.js')
-rw-r--r--app.js12
1 files changed, 1 insertions, 11 deletions
diff --git a/app.js b/app.js
index cd645379..36846440 100644
--- a/app.js
+++ b/app.js
@@ -199,18 +199,8 @@ app.set('view engine', 'ejs')
app.use(require('./lib/web/baseRouter'))
app.use(require('./lib/web/statusRouter'))
app.use(require('./lib/web/auth'))
+app.use(require('./lib/web/historyRouter'))
-var history = require('./lib/history.js')
-// get history
-app.get('/history', history.historyGet)
-// post history
-app.post('/history', urlencodedParser, history.historyPost)
-// post history by note id
-app.post('/history/:noteId', urlencodedParser, history.historyPost)
-// delete history
-app.delete('/history', history.historyDelete)
-// delete history by note id
-app.delete('/history/:noteId', history.historyDelete)
// get me info
app.get('/me', function (req, res) {
if (req.isAuthenticated()) {