diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-28 09:29:26 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-28 09:29:26 +0200 |
commit | 615293e477ef5bace312a0d4d7cce99422bf3c3a (patch) | |
tree | 69f6948d48482aebd087a9f202435cc5e01d347d | |
parent | d50ca672b3651131cabde0d0c142d323174e7037 (diff) | |
download | Nix-615293e477ef5bace312a0d4d7cce99422bf3c3a.tar.gz Nix-615293e477ef5bace312a0d4d7cce99422bf3c3a.tar.zst Nix-615293e477ef5bace312a0d4d7cce99422bf3c3a.zip |
Fix codenames landing page
-rw-r--r-- | modules/private/websites/tools/games/codenames/greenapid.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/private/websites/tools/games/codenames/greenapid.patch b/modules/private/websites/tools/games/codenames/greenapid.patch index a8f670a..21a9fad 100644 --- a/modules/private/websites/tools/games/codenames/greenapid.patch +++ b/modules/private/websites/tools/games/codenames/greenapid.patch | |||
@@ -24,3 +24,16 @@ index 86499e9..1589323 100644 | |||
24 | + err = server.Serve(ln) | 24 | + err = server.Serve(ln) |
25 | panic(err) | 25 | panic(err) |
26 | } | 26 | } |
27 | diff --git a/gameapi/handler.go b/gameapi/handler.go | ||
28 | index d67cf94..108e7e1 100644 | ||
29 | --- a/gameapi/handler.go | ||
30 | +++ b/gameapi/handler.go | ||
31 | @@ -101,7 +101,7 @@ func (h *handler) handleIndex(rw http.ResponseWriter, req *http.Request) { | ||
32 | for { | ||
33 | w1 := strings.ToLower(h.allWords[h.rand.Int63n(int64(len(h.allWords)))]) | ||
34 | w2 := strings.ToLower(h.allWords[h.rand.Int63n(int64(len(h.allWords)))]) | ||
35 | - id := fmt.Sprintf("%s-%s", w1, w2) | ||
36 | + id = fmt.Sprintf("%s-%s", w1, w2) | ||
37 | if _, ok := h.games[id]; !ok { | ||
38 | break | ||
39 | } | ||