game creation works
This commit is contained in:
parent
de67f31ba3
commit
302efad4c9
1 changed files with 2 additions and 1 deletions
|
@ -60,7 +60,8 @@ pub async fn websocket(stream: WebSocket, state: Arc<AppState>) {
|
|||
tracing::debug!("Text: {}", text);
|
||||
|
||||
if let Ok(new_game) = serde_json::from_str::<NewGameRequest>(&text) {
|
||||
tracing::debug!("{:#?}", new_game);
|
||||
tracing::debug!("{:#?}", &new_game);
|
||||
state.games.lock().unwrap().push(CAHGame::new(new_game).expect("error creating game"));
|
||||
} else {
|
||||
// just echo
|
||||
let _res = sender.send(Message::Text(text)).await;
|
||||
|
|
Loading…
Add table
Reference in a new issue