form: fix captcha

wouldn't compile (not sure why i didn't notice) and after fixing, the
check was being performed after deleting the invite so would always
fail.
This commit is contained in:
Harvey Tindall
2022-01-13 20:40:58 +00:00
parent d9f8785372
commit 1c942186aa
4 changed files with 13 additions and 8 deletions
+4 -2
View File
@@ -263,7 +263,8 @@ interface sendDTO {
discord_contact?: boolean;
matrix_pin?: string;
matrix_contact?: boolean;
captcha?: string;
captcha_id?: string;
captcha_text?: string;
}
let captchaVerified = false;
@@ -338,7 +339,8 @@ const create = (event: SubmitEvent) => {
}
}
if (window.captcha) {
send.captcha = captchaInput.value;
send.captcha_id = captchaID;
send.captcha_text = captchaInput.value;
}
_post("/newUser", send, (req: XMLHttpRequest) => {
if (req.readyState == 4) {