소스 검색

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) {