diff options
author | LarsVomMars | 2020-10-03 12:19:18 +0200 |
---|---|---|
committer | LarsVomMars | 2020-10-03 12:19:18 +0200 |
commit | e5a757786f632ef15aae7f4010e120d5479b869b (patch) | |
tree | 97be52bbd30f18b1baa9ab2e0977c9185897af5b /mottovote/public | |
parent | 30dd80aa4e7310c3f7958f2db261233583ded909 (diff) |
Fixes
Diffstat (limited to 'mottovote/public')
-rw-r--r-- | mottovote/public/script.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mottovote/public/script.js b/mottovote/public/script.js index c8432c5..05ca940 100644 --- a/mottovote/public/script.js +++ b/mottovote/public/script.js @@ -46,7 +46,8 @@ function addListeners() { headers: { "Content-Type": "application/json" }, body: JSON.stringify(req), }); - console.log(await resp.text()); - + const res = await resp.text(); + if (res === "ok") location.reload(); + else alert(res); }); }
\ No newline at end of file |