修复新token的存储

This commit is contained in:
Vinlic 2024-03-13 22:39:35 +08:00
parent 75cfa446ca
commit c54f89e9f8

View File

@ -102,8 +102,10 @@ async function acquireToken(refreshToken: string): Promise<string> {
result = await requestToken(refreshToken);
accessTokenMap.set(refreshToken, result);
}
if (util.unixTimestamp() > result.refreshTime)
if (util.unixTimestamp() > result.refreshTime) {
result = await requestToken(refreshToken);
accessTokenMap.set(refreshToken, result);
}
return result.accessToken;
}