summaryrefslogtreecommitdiff
path: root/bucky/app/router.js
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/app/router.js')
-rw-r--r--bucky/app/router.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/bucky/app/router.js b/bucky/app/router.js
index eada09b..e5890ca 100644
--- a/bucky/app/router.js
+++ b/bucky/app/router.js
@@ -118,18 +118,30 @@ module.exports = function(app){
})
app.delete("/api/thread/:id",
middleware.ensureAuthenticated,
+ bucky.ensureThread,
+// bucky.destroyThread,
function(req, res){
// delete a thread
+ res.send(200)
})
+ // edit a comment
app.put("/api/comment/:id",
middleware.ensureAuthenticated,
+ bucky.ensureComment,
+ bucky.checkCommentPrivacy,
+ bucky.updateComment,
function(req, res){
- // edit a comment
+ res.send(200)
})
+ // delete a comment
app.delete("/api/comment/:id",
middleware.ensureAuthenticated,
+ bucky.ensureComment,
+ bucky.checkCommentPrivacy,
+ bucky.destroyComment,
function(req, res){
- // delete a comment
+ console.log("BUAHLAHA")
+ res.send(200)
})
app.get("/search/",