summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/router.js33
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
+ }
+ )
}