Uncomment sync_scores, format

This commit is contained in:
2026-05-23 20:16:14 -07:00
parent 5bb33c87f7
commit d778165029
2 changed files with 8 additions and 7 deletions

View File

@ -91,18 +91,19 @@ fn get_all_games(conn: Connection, all_teams: HashMap<String, Team>) -> GamesRes
fn update_game_sqlite(conn: Connection, game: Game) -> Result<(), rusqlite::Error> {
let update_query = Query::update()
.table("games")
.values([("start_time", game.start_time.into()), ("end_time", game.end_time.into())])
.values([
("start_time", game.start_time.into()),
("end_time", game.end_time.into()),
])
.and_where(Expr::col("code").eq(game.code))
.to_owned();
let mut update_stmt = conn.prepare(
&update_query.to_string(SqliteQueryBuilder)
)?;
let mut update_stmt = conn.prepare(&update_query.to_string(SqliteQueryBuilder))?;
let result = update_stmt.query([]);
match result {
Ok(_) => Ok(()),
Err(error) => Err(error)
Err(error) => Err(error),
}
}

View File

@ -210,7 +210,7 @@ async fn main() -> std::io::Result<()> {
games: state.clone(),
}
.start();
//sync_scores(actor_addr.clone()).await;
sync_scores(actor_addr.clone()).await;
HttpServer::new(move || {
App::new()
.app_data(web::Data::new(pool.clone()))