From 3389ca6e38e6ab5edf025ae56fe3f6c3d5b511ce Mon Sep 17 00:00:00 2001 From: Arzumify Date: Sat, 13 Jul 2024 17:32:59 +0100 Subject: [PATCH] Rate limiting supoprt --- static/js/signup.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/static/js/signup.js b/static/js/signup.js index f11b3bc..1e36e0f 100644 --- a/static/js/signup.js +++ b/static/js/signup.js @@ -109,11 +109,12 @@ signupButton.addEventListener("click", () => { localStorage.setItem("DONOTSHARE-password", await hashwasm.sha512(password)) window.location.href = "/app/" - } - else if (response.status === 409) { + } else if (response.status === 409) { statusBox.innerText = "Username already taken!" showElements(true) - } + } else if (response.status === 429) { + statusBox.innerText = "Please don't sign up to new accounts that quickly. If you are using a VPN, please turn it off!" + showElements(true) else { statusBox.innerText = "Something went wrong! (error code: " + response.status + ")" showElements(true) @@ -125,4 +126,4 @@ signupButton.addEventListener("click", () => { doStuff() }); -// @license-end \ No newline at end of file +// @license-end