feat: Add lastUsedAt to API keys (#7082)

* feat: Add lastUsedAt to API keys

* rename column to lastActiveAt

* switch order
This commit is contained in:
Hemachandar
2024-06-20 18:48:35 +05:30
committed by GitHub
parent a19fb25bea
commit 1bf9012992
9 changed files with 72 additions and 0 deletions

View File

@@ -100,6 +100,8 @@ export default function auth(options: AuthenticationOptions = {}) {
if (!user) {
throw AuthenticationError("Invalid API key");
}
await apiKey.updateActiveAt();
} else {
type = AuthenticationType.APP;
user = await getUserForJWT(String(token));