summaryrefslogtreecommitdiff
path: root/bucky/app/bucky.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-12 06:06:41 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-12 06:06:41 +0100
commitb29bf8bdc1d43699160d542a636fb1e65362b7ae (patch)
treec298274a5cfc2dbe715b4b1572896fc0adc36131 /bucky/app/bucky.js
parent5dadac51b65c714e2235f28c000a646716e2a63a (diff)
bump last seen
Diffstat (limited to 'bucky/app/bucky.js')
-rw-r--r--bucky/app/bucky.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js
index 41c3bff..a31d50f 100644
--- a/bucky/app/bucky.js
+++ b/bucky/app/bucky.js
@@ -170,6 +170,7 @@ var bucky = module.exports = {
next()
})
},
+
bumpViewCount: function(req, res, next) {
res.thread.set('viewed', res.thread.get('viewed') + 1)
res.thread.save().then( () => next() )
@@ -393,6 +394,10 @@ var bucky = module.exports = {
}
})
},
+ bumpLastSeen: function(req, res, next) {
+ req.user.set('lastseen', util.now())
+ req.user.save().then( () => next() )
+ },
/* PRIVACY */
checkThreadPrivacy: function(req, res, next) {