diff --git a/modules/access_tokens_guard/token_providers/db.ts b/modules/access_tokens_guard/token_providers/db.ts index 1e78030..24c34ad 100644 --- a/modules/access_tokens_guard/token_providers/db.ts +++ b/modules/access_tokens_guard/token_providers/db.ts @@ -423,16 +423,16 @@ export class DbAccessTokensProvider< /** * Update last time the token is used */ - dbRow.last_used_at = new Date() + const last_used_at = new Date() await db .from(this.table) .where({ id: dbRow.id, type: dbRow.type }) - .update({ last_used_at: dbRow.last_used_at }) + .update({ last_used_at: last_used_at }) /** * Convert to access token instance */ - const accessToken = this.dbRowToAccessToken(dbRow) + const accessToken = this.dbRowToAccessToken({ ...dbRow, last_used_at }) /** * Ensure the token secret matches the token hash