summaryrefslogtreecommitdiff
path: root/bucky/app/router.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-11 09:52:40 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-11 09:52:40 +0100
commitc06f440e4a41853fc30ff5b231c68bd766ba96fa (patch)
tree2f1972dbdde80ff05cac339576a0d5cd63f4254d /bucky/app/router.js
parent2be058bfd57790616a9d3282260a89dc1ccf65ab (diff)
remove comments
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/",