Sfoglia il codice sorgente

Response bij aanmaken game

Harry de Boer 10 anni fa
parent
commit
dbe75921a2
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      main.go

+ 2 - 0
main.go

@@ -59,6 +59,8 @@ func createGame(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
 
 	currentGames.AddGame(game)
 	w.WriteHeader(http.StatusCreated)
+	e := json.NewEncoder(w)
+	e.Encode(game)
 }
 
 func joinGame(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {