Преглед на файлове

Response bij aanmaken game

Harry de Boer преди 10 години
родител
ревизия
dbe75921a2
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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) {