Fix poles

This commit is contained in:
Guillermo Roche 2024-09-25 19:28:59 +02:00
parent 58724835ae
commit 8678b3035b
Signed by: groche97
GPG Key ID: 041FB85BEEA4B9B0

View File

@ -162,10 +162,11 @@ impl<'a> DatabasePole{
.unwrap(); .unwrap();
statement.bind((1, group_id)).unwrap(); statement.bind((1, group_id)).unwrap();
statement.bind((2, date)).unwrap(); statement.bind((2, date)).unwrap();
match statement.next().unwrap() { let mut ret = 0;
State::Row => statement.read::<i64, _>(0).unwrap(), while statement.next().unwrap() == State::Row {
State::Done => 0, ret += statement.read::<i64, _>(0).unwrap();
} }
ret
} }
pub fn get_top_users(&self, group_id : &str) -> Vec<(i64,String)>{ pub fn get_top_users(&self, group_id : &str) -> Vec<(i64,String)>{