diff --git a/TODO.md b/TODO.md index a352a2a..039b5e2 100644 --- a/TODO.md +++ b/TODO.md @@ -1 +1 @@ -- Revisar instanciado dos xogadores. Durante as probas do combate pareceume que non se instanciaban ben cando se usaba un xogador que xa existía. +- Revisar update_player. Machaca tódolos rows da bbdd. diff --git a/src/player.rs b/src/player.rs index 610706c..28f8456 100644 --- a/src/player.rs +++ b/src/player.rs @@ -29,6 +29,7 @@ pub fn update_player(newplayer: &Player) -> Result use crate::schema::player; let conn = &mut establish_connection(); + // FIXME: actualiza todos os rows... diesel::update(player::table) .set(newplayer) // co trait AsChangeSet podese actualizar a struct enteira .execute(conn)