summaryrefslogtreecommitdiff
path: root/bucky/app/api.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-22 07:46:52 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-22 07:47:41 +0100
commitfe7ee50baa8f96836ecefa2088d129b90705125c (patch)
treed148e031ac882a1af0ea35629d6cd27c560d50fb /bucky/app/api.js
parentfa4ed0f3b1ce5decfc6ee59d38e63e78a7793de4 (diff)
new mail alert
Diffstat (limited to 'bucky/app/api.js')
-rw-r--r--bucky/app/api.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/bucky/app/api.js b/bucky/app/api.js
index 63e480e..f0474a4 100644
--- a/bucky/app/api.js
+++ b/bucky/app/api.js
@@ -52,11 +52,13 @@ function route (app){
bucky.ensureKeywordsForThreads,
bucky.ensureHootbox,
bucky.bumpLastSeen,
+ bucky.checkMail,
function(req, res){
res.json({
threads: res.threads,
hootbox: res.hootbox,
lastlog: res.lastlog,
+ mail: res.mail,
})
})
app.post("/api/keyword/new",
@@ -75,12 +77,14 @@ function route (app){
bucky.ensureFileCountsForThreads,
bucky.ensureKeywordsForThreads,
bucky.ensureHootbox,
+ bucky.checkMail,
function(req, res){
res.json({
keyword: res.keyword,
threads: res.threads,
hootbox: res.hootbox,
lastlog: res.lastlog,
+ mail: res.mail,
})
})
app.get("/api/thread/:id",