Refine token validation and update user stats endpoint.
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
Extend access token validation to include a 10-second buffer to prevent potential expiry issues. Modify the user stats API call to use the base `/stats/user` endpoint for improved consistency.
This commit is contained in:
@ -155,7 +155,7 @@ export class AuthV2Repo {
|
||||
}
|
||||
|
||||
async request(url: string, params: RequestInit = {}) {
|
||||
if (this.accessToken !== undefined && this.accessTokenExpires !== undefined && this.accessTokenExpires.isBefore(dayjs())) {
|
||||
if (this.accessToken !== undefined && this.accessTokenExpires !== undefined && this.accessTokenExpires.isBefore(dayjs().add(10, "seconds"))) {
|
||||
await this.refresh();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user