mirror of
https://github.com/LLM-Red-Team/kimi-free-api.git
synced 2024-11-01 22:09:20 +08:00
修复新token的存储
This commit is contained in:
parent
75cfa446ca
commit
c54f89e9f8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user