|
|
@@ -13,6 +13,7 @@ function doVote() { |
|
|
|
response.text().then(body => { |
|
|
|
if (!response.ok) { |
|
|
|
alert(body) |
|
|
|
location.href="fail.html" |
|
|
|
} else { |
|
|
|
let magicString = findMagic(body) |
|
|
|
fetch("/submit", { |
|
|
@@ -24,6 +25,9 @@ function doVote() { |
|
|
|
}).then(res => { |
|
|
|
if (!res.ok) { |
|
|
|
res.text().then(res => alert(res)) |
|
|
|
location.href="fail.html" |
|
|
|
} else { |
|
|
|
location.href="finish.html" |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|