ye
This commit is contained in:
parent
a596932aed
commit
61ded634cc
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,6 @@
|
|||
use crate::api::{greeting, Message, User};
|
||||
use crate::AppState;
|
||||
use crate::Arc;
|
||||
use anyhow::Result;
|
||||
use lib::models::*;
|
||||
|
||||
pub async fn message_handler(message: Message, state: &Arc<AppState>, who: &User) {
|
||||
|
@ -15,6 +14,7 @@ pub async fn message_handler(message: Message, state: &Arc<AppState>, who: &User
|
|||
if let Ok(new_game_object) = Game::new(new_game) {
|
||||
if let Ok(game_json) = serde_json::to_string(&new_game_object) {
|
||||
tracing::debug!("Sent new game JSON.");
|
||||
// this is a broadcast
|
||||
let _ = tx.send(game_json);
|
||||
} else {
|
||||
tracing::error!("Failed to convert Game object to JSON.")
|
||||
|
|
Loading…
Add table
Reference in a new issue