summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/endpoints/i.ts8
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()
+ }
+ });
});