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.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/bucky/app/router.js b/bucky/app/router.js
index 56e1f36..7fbf479 100644
--- a/bucky/app/router.js
+++ b/bucky/app/router.js
@@ -301,8 +301,14 @@ module.exports = function(app){
bucky.deleteDraft,
function(req, res){
res.json({ status: "ok" })
- }
- )
+ })
+ app.delete("/api/message/:id",
+ middleware.ensureAuthenticated,
+ bucky.ensureMessage,
+ bucky.destroyMessage,
+ function(req, res){
+ res.json({ status: "ok" })
+ })
auth.route(app)
}