summaryrefslogtreecommitdiffstats
path: root/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index 79c88d2..4666f4c 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -2,8 +2,10 @@ import "Styles/index.css";
async function goToMain() {
const i = document.getElementsByTagName("input")[0]
- const res = await (await fetch("http://localhost:8001/getFridge.php?name=" + i.value)).text()
+ if (i.value === '') return;
+ const res = await (await fetch("http://localhost:8001/get-fridge.php?name=" + i.value)).text()
sessionStorage.fridge = res;
+ sessionStorage.name = i.value;
location.href = "/main.html"
}
declare global {