Change weight formula and fixing bugs

This commit is contained in:
2026-04-15 07:53:32 +03:00
parent fa26eb3442
commit ed02be0e77
3 changed files with 19 additions and 7 deletions
+3 -3
View File
@@ -74,12 +74,12 @@ pub fn update_stat_score(stat: &CardStatistics, connection: &Connection){
.unwrap_or_else(|e| {println!("{}", e); 0});
}
pub fn delete_set(set: &CardSetSettings, connection: &Connection) {
if set.id == 0 {
pub fn delete_stat(stat: &CardStatistics, connection: &Connection) {
if stat.id == 0 {
return;
}
connection
.execute("DELETE FROM card_stats WHERE id = ?1", (&set.id,))
.execute("DELETE FROM card_stats WHERE id = ?1", (&stat.id,))
.unwrap_or_else(|e| {
println!("{}", e);
0