diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-12 07:23:13 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-12 07:23:13 +0900 |
| commit | 0fc99341b698167f7a099df42d70037ef6304ea2 (patch) | |
| tree | b7822e0b605b44461aea88b2e9bf04667d27ff5c /src/api/endpoints/i.ts | |
| parent | [Client] Better draft management (diff) | |
| download | sharkey-0fc99341b698167f7a099df42d70037ef6304ea2.tar.gz sharkey-0fc99341b698167f7a099df42d70037ef6304ea2.tar.bz2 sharkey-0fc99341b698167f7a099df42d70037ef6304ea2.zip | |
#268
Diffstat (limited to 'src/api/endpoints/i.ts')
| -rw-r--r-- | src/api/endpoints/i.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/api/endpoints/i.ts b/src/api/endpoints/i.ts index 0e5efdb984..ae75f11d54 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() + } + }); }); |