feat: re-try if ratelimited for multi-whitelist feature
This commit is contained in:
parent
80be8b407d
commit
aa840db336
1 changed files with 2 additions and 2 deletions
|
|
@ -192,7 +192,7 @@ function MultiWhitelist(){
|
||||||
MultiWhitelistSubmitButton.previousElementSibling.disabled = true
|
MultiWhitelistSubmitButton.previousElementSibling.disabled = true
|
||||||
if (Usernames.length > 0) {
|
if (Usernames.length > 0) {
|
||||||
for (let username of Usernames) {
|
for (let username of Usernames) {
|
||||||
const WhitelistAddRequest = (await (await fetch('https://polytoria.com/api/create/whitelist', {
|
Utilities.RatelimitRepeatingFetch('https://polytoria.com/api/create/whitelist', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|
@ -201,7 +201,7 @@ function MultiWhitelist(){
|
||||||
placeID: PlaceID,
|
placeID: PlaceID,
|
||||||
username: username
|
username: username
|
||||||
})
|
})
|
||||||
})).json())
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
|
|
|
||||||
Reference in a new issue