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.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/bucky/app/router.js b/bucky/app/router.js
index 7ac6599..fe7d336 100644
--- a/bucky/app/router.js
+++ b/bucky/app/router.js
@@ -66,8 +66,14 @@ module.exports = function(app){
})
app.post("/api/thread/:id/comment",
middleware.ensureAuthenticated,
+ bucky.ensureThread,
+ // ensure thread privacy
+ bucky.createComment,
+ // add comments and files
function(req, res){
- // add comments and files
+ res.json({
+ comment: res.comment
+ })
})
app.delete("/api/thread/:id",
middleware.ensureAuthenticated,