From cbf078494b03bff9e528ce9e73a81ce3c184d7b5 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 10 Oct 2016 20:52:09 +0800 Subject: [PATCH] Update to add post history by note id with data, delete all history and delete history by id and rename methods --- app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.js b/app.js index 86df101..26c099e 100644 --- a/app.js +++ b/app.js @@ -369,6 +369,12 @@ app.get('/logout', function (req, res) { 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()) {