feat: Add lastUsedAt to API keys (#7082)
* feat: Add lastUsedAt to API keys * rename column to lastActiveAt * switch order
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user