From 0ee4c070508ae7197070033d88a2e4434f6754a4 Mon Sep 17 00:00:00 2001 From: KaseToatz1337 Date: Fri, 26 Apr 2024 14:40:36 +0200 Subject: [PATCH] Update script.js --- html/assets/script.js | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/html/assets/script.js b/html/assets/script.js index c08d146..7432780 100644 --- a/html/assets/script.js +++ b/html/assets/script.js @@ -47,21 +47,11 @@ window.onload = () => { formData.append("amount", parseInt(amount.value)); text.innerText = "Flooding in progress..."; text.style.color = "green"; - try - { - fetch("/api/flood", { - method: "POST", - body: formData - }).then((response) => { - console.log("YOUR MOMM"); - }) - response = await request.json(); - } - catch (exc) - { - console.log("FUCK OFF"); - } - console.log(response.message); + var request = fetch("/api/flood", { + method: "POST", + body: formData + }); + response = await request.json(); text.innerText = response.message; if (response.type == "error") {