diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-09-13 08:29:03 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-09-13 08:29:03 -0400 |
| commit | 8824882d7aec3061b9f6a74874494316d3ada88e (patch) | |
| tree | 219301fe4e0a2f57933fa51caaf826f14ae73632 /lib/router.js | |
| parent | 2b85d6f17fa2b70c53d2adaa4d7662771031b38e (diff) | |
routes
Diffstat (limited to 'lib/router.js')
| -rw-r--r-- | lib/router.js | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/lib/router.js b/lib/router.js index 67fee61..66aa1bf 100644 --- a/lib/router.js +++ b/lib/router.js @@ -59,18 +59,32 @@ module.exports = function(app){ }) } ) - app.post("/api/thread/:id", + app.post("/api/thread", middleware.ensureAuthenticated, function(req, res){ + // make a new thread }) app.post("/api/thread/:id/comment", middleware.ensureAuthenticated, function(req, res){ + // add comments and files }) app.delete("/api/thread/:id", middleware.ensureAuthenticated, function(req, res){ + // delete a thread }) + app.put("/api/comment/:id", + middleware.ensureAuthenticated, + function(req, res){ + // edit a comment + }) + app.delete("/api/comment/:id", + middleware.ensureAuthenticated, + function(req, res){ + // delete a comment + }) + app.get("/api/keyword/:keyword", middleware.ensureAuthenticated, @@ -87,15 +101,6 @@ module.exports = function(app){ } ) - app.put("/api/comment/:id", - middleware.ensureAuthenticated, - function(req, res){ - }) - app.delete("/api/comment/:id", - middleware.ensureAuthenticated, - function(req, res){ - }) - app.get("/mail/", middleware.ensureAuthenticated, function(req, res){ @@ -114,7 +119,6 @@ module.exports = function(app){ res.render("pages/message", { title: util.sanitize(req.params.box) }) } ) - app.get("/api/mailbox/:box", middleware.ensureAuthenticated, bucky.ensureMailboxes, @@ -128,7 +132,6 @@ module.exports = function(app){ }) } ) - app.get("/api/message/:id", middleware.ensureAuthenticated, bucky.ensureMessage, @@ -137,5 +140,11 @@ module.exports = function(app){ message: res.message, }) }) + app.post("/mail/", + middleware.ensureAuthenticated, + function(req, res){ + // send new mail + } + ) } |
