chore: Track lastActiveAt for teams (#6491)

This commit is contained in:
Tom Moor
2024-02-04 11:14:18 -08:00
committed by GitHub
parent 234613580d
commit 8ee266f7b1
3 changed files with 45 additions and 1 deletions

View File

@@ -122,10 +122,13 @@ export default function auth(options: AuthenticationOptions = {}) {
}
}
// not awaiting the promise here so that the request is not blocked
// not awaiting the promises here so that the request is not blocked
user.updateActiveAt(ctx).catch((err) => {
Logger.error("Failed to update user activeAt", err);
});
user.team?.updateActiveAt().catch((err) => {
Logger.error("Failed to update team activeAt", err);
});
ctx.state.auth = {
user,