summaryrefslogtreecommitdiff
path: root/bucky/app/bucky.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-04-04 20:57:43 +0200
committerJules Laplace <julescarbon@gmail.com>2020-04-04 20:57:43 +0200
commit932fe6e61b0f7d1a94a9dd9b965637d0b3a699e4 (patch)
treec8f3e496e454e89149384b32e437ecec87d1dfdf /bucky/app/bucky.js
parent400cdb804dc0fe967393edd338ec8c094c4b0998 (diff)
stub sdk. add keywords fix. stub users
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()