diff options
Diffstat (limited to 'bucky/app/api.js')
| -rw-r--r-- | bucky/app/api.js | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/bucky/app/api.js b/bucky/app/api.js index ff17626..63e480e 100644 --- a/bucky/app/api.js +++ b/bucky/app/api.js @@ -41,7 +41,7 @@ function route (app){ /* threads */ - + app.get("/api/index", bucky.ensureLastlog, middleware.ensureAuthenticated, @@ -59,6 +59,13 @@ function route (app){ lastlog: res.lastlog, }) }) + app.post("/api/keyword/new", + bucky.ensureLastlog, + middleware.ensureAuthenticated, + bucky.createKeyword, + function(req, res){ + res.json({ keyword: res.keyword }) + }) app.get("/api/keyword/:keyword", bucky.ensureLastlog, middleware.ensureAuthenticated, @@ -123,10 +130,10 @@ function route (app){ function(req, res){ res.send({ status: 'ok' }) }) - + /* comments */ - // one endpoint handles comments + files + // one endpoint handles comments + files app.post("/api/thread/:id/comment", middleware.ensureAuthenticated, bucky.ensureThread, @@ -178,7 +185,7 @@ function route (app){ }) /* search */ - + app.get("/api/search", middleware.ensureAuthenticated, search.search, @@ -190,7 +197,7 @@ function route (app){ ) /* keywords */ - + app.get("/api/keywords", middleware.ensureAuthenticated, bucky.ensureKeywords, @@ -223,10 +230,10 @@ function route (app){ threads: res.threads, }) }) - - + + /* mail */ - + app.get("/api/mailbox/:box", middleware.ensureAuthenticated, bucky.ensureMailboxes, |
