mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
restore login rate-limit checks
This commit is contained in:
parent
a2062c6469
commit
1bf6cdc17f
1 changed files with 7 additions and 0 deletions
|
@ -95,6 +95,13 @@ function fetchAccount(token: string, id?: string, forceShowDialog?: boolean): Pr
|
||||||
text: i18n.ts.tokenRevokedDescription,
|
text: i18n.ts.tokenRevokedDescription,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (res.error.id === 'd5826d14-3982-4d2e-8011-b9e9f02499ef') {
|
||||||
|
// rate limited
|
||||||
|
const timeToWait = res.error.info?.resetMs ?? 1000;
|
||||||
|
window.setTimeout(() => {
|
||||||
|
fetchAccount(token, id, forceShowDialog).then(done, fail);
|
||||||
|
}, timeToWait);
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
await alert({
|
await alert({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|
Loading…
Add table
Reference in a new issue