From b29bf8bdc1d43699160d542a636fb1e65362b7ae Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 12 Dec 2017 06:06:41 +0100 Subject: bump last seen --- bucky/app/bucky.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bucky/app/bucky.js') 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) { -- cgit v1.2.3-70-g09d2