Update script.js

This commit is contained in:
KaseToatz1337
2024-04-26 14:40:36 +02:00
parent 8c4dd48999
commit 0ee4c07050

View File

@ -47,21 +47,11 @@ window.onload = () => {
formData.append("amount", parseInt(amount.value)); formData.append("amount", parseInt(amount.value));
text.innerText = "Flooding in progress..."; text.innerText = "Flooding in progress...";
text.style.color = "green"; text.style.color = "green";
try var request = fetch("/api/flood", {
{ method: "POST",
fetch("/api/flood", { body: formData
method: "POST", });
body: formData response = await request.json();
}).then((response) => {
console.log("YOUR MOMM");
})
response = await request.json();
}
catch (exc)
{
console.log("FUCK OFF");
}
console.log(response.message);
text.innerText = response.message; text.innerText = response.message;
if (response.type == "error") if (response.type == "error")
{ {