mirror of https://github.com/dirtbags/moth.git
Compare commits
No commits in common. "c20cc1484fd073f701a091338ba1ce9fe0bb21ba" and "59a6aef0077331938263346dbb70925e8a69745f" have entirely different histories.
c20cc1484f
...
59a6aef007
|
@ -45,7 +45,7 @@ func TestHttpd(t *testing.T) {
|
||||||
|
|
||||||
if r := hs.TestRequest("/state", nil); r.Result().StatusCode != 200 {
|
if r := hs.TestRequest("/state", nil); r.Result().StatusCode != 200 {
|
||||||
t.Error(r.Result())
|
t.Error(r.Result())
|
||||||
} else if r.Body.String() != `{"Config":{"Devel":false},"Enabled":true,"TeamNames":{},"PointsLog":[],"Puzzles":{}}` {
|
} else if r.Body.String() != `{"Config":{"Devel":false},"TeamNames":{},"PointsLog":[],"Puzzles":{}}` {
|
||||||
t.Error("Unexpected state", r.Body.String())
|
t.Error("Unexpected state", r.Body.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ func TestHttpd(t *testing.T) {
|
||||||
|
|
||||||
if r := hs.TestRequest("/state", nil); r.Result().StatusCode != 200 {
|
if r := hs.TestRequest("/state", nil); r.Result().StatusCode != 200 {
|
||||||
t.Error(r.Result())
|
t.Error(r.Result())
|
||||||
} else if r.Body.String() != `{"Config":{"Devel":false},"Enabled":true,"TeamNames":{"self":"GoTeam"},"PointsLog":[],"Puzzles":{"pategory":[1]}}` {
|
} else if r.Body.String() != `{"Config":{"Devel":false},"TeamNames":{"self":"GoTeam"},"PointsLog":[],"Puzzles":{"pategory":[1]}}` {
|
||||||
t.Error("Unexpected state", r.Body.String())
|
t.Error("Unexpected state", r.Body.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,6 @@ async function loadPuzzle(category, points) {
|
||||||
async function init() {
|
async function init() {
|
||||||
window.app = {}
|
window.app = {}
|
||||||
window.setanswer = (str => SetAnswer(str))
|
window.setanswer = (str => SetAnswer(str))
|
||||||
window.checkAnswer = (str => window.app.puzzle.IsPossiblyCorrect(str))
|
|
||||||
|
|
||||||
for (let form of document.querySelectorAll("form.answer")) {
|
for (let form of document.querySelectorAll("form.answer")) {
|
||||||
form.addEventListener("submit", formSubmitHandler)
|
form.addEventListener("submit", formSubmitHandler)
|
||||||
|
|
Loading…
Reference in New Issue