From 950e74401e7e73ebffd26c9f2d7eaee3c2bd76a0 Mon Sep 17 00:00:00 2001 From: serxoz Date: Thu, 15 Sep 2022 17:25:55 +0200 Subject: [PATCH] bug en update_player detectado --- TODO.md | 2 +- src/player.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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)