summaryrefslogtreecommitdiff
path: root/bucky/app/bucky.js
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/app/bucky.js')
-rw-r--r--bucky/app/bucky.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js
index 3824c5e..8ff0b15 100644
--- a/bucky/app/bucky.js
+++ b/bucky/app/bucky.js
@@ -296,6 +296,12 @@ var bucky = module.exports = {
next()
})
},
+ ensureLatestKeywordThreads: function (req, res, next){
+ db.getLatestKeywordThreads().then(function(threads){
+ res.threads = threads
+ next()
+ })
+ },
ensureThreadGroups: function (req, res, next){
db.getThreadGroups().then(function(threadGroups){
res.threadGroups = threadGroups
@@ -564,6 +570,15 @@ var bucky = module.exports = {
}
})
},
+ ensureUserlist: function (req, res, next){
+ db.getUsers().then(function(users){
+ if (! users) {
+ return res.sendStatus(404)
+ }
+ res.users = users
+ next()
+ })
+ },
sanitizeUser: function(req, res, next) {
res.user = util.sanitizeUser(res.user)
next()