diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2021-10-31 14:31:29 +0100 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2021-10-31 14:31:29 +0100 |
| commit | 27075885e95bd0efc062920685e04287feb4b556 (patch) | |
| tree | 0c51ab493589bd0ebd7b733ada697ed777aa08d1 /src/index.ts | |
| parent | dbb66972ebd987f60e10939bfb4493f87bbc73c3 (diff) | |
| download | isiqandisi-27075885e95bd0efc062920685e04287feb4b556.tar.gz isiqandisi-27075885e95bd0efc062920685e04287feb4b556.tar.zst isiqandisi-27075885e95bd0efc062920685e04287feb4b556.zip | |
Almost the end
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 4 |
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 { |
