feat: display when an api key was last used, in ACP, #10873

This commit is contained in:
Julian Lam
2023-03-20 16:01:21 -04:00
parent 2614b95c40
commit 402229845c
6 changed files with 41 additions and 1 deletions

View File

@@ -9,3 +9,5 @@ const utils = module.exports;
utils.log = async (token) => {
await db.sortedSetAdd('tokens:lastSeen', Date.now(), token);
};
utils.getLastSeen = async tokens => await db.sortedSetScores('tokens:lastSeen', tokens);