diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-11 04:25:19 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-11 04:25:19 +0100 |
| commit | 4c775f12ff6eda48fc22bec9ed336e60c1a0e07e (patch) | |
| tree | 792b3906107442dc6823440fa0bf21a7bea1a224 /bucky/app/router.js | |
| parent | 6702125f12820c504ae18114f99fee3e13b2616f (diff) | |
cssssssss
Diffstat (limited to 'bucky/app/router.js')
| -rw-r--r-- | bucky/app/router.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bucky/app/router.js b/bucky/app/router.js index 4f4396f..007ff6b 100644 --- a/bucky/app/router.js +++ b/bucky/app/router.js @@ -66,6 +66,24 @@ module.exports = function(app){ }) } ) + app.get("/api/keyword/:keyword", + bucky.ensureLastlog, + middleware.ensureAuthenticated, + bucky.keyword, + bucky.ensureThreadsForKeyword, + bucky.ensureCommentCountsForThreads, + bucky.ensureFileCountsForThreads, + bucky.ensureKeywordsForThreads, + bucky.ensureHootbox, + function(req, res){ + res.json({ + keyword: res.keyword, + threads: res.threads, + hootbox: res.hootbox, + lastlog: res.lastlog, + }) + } + ) app.get("/api/thread/:id", middleware.ensureAuthenticated, bucky.ensureThread, |
