From a4736a6c71355b323fb74e648a4afd1ac63a3ea8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 12 Mar 2017 07:23:13 +0900 Subject: [PATCH] #268 --- src/api/endpoints/i.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/api/endpoints/i.ts b/src/api/endpoints/i.ts index 0e5efdb98..ae75f11d5 100644 --- a/src/api/endpoints/i.ts +++ b/src/api/endpoints/i.ts @@ -1,6 +1,7 @@ /** * Module dependencies */ +import User from '../models/user'; import serialize from '../serializers/user'; /** @@ -18,4 +19,11 @@ module.exports = (params, user, _, isSecure) => new Promise(async (res, rej) => detail: true, includeSecrets: isSecure })); + + // Update lastUsedAt + User.update({ _id: user._id }, { + $set: { + last_used_at: new Date() + } + }); });