only count those who have found at least 1 cam as participant
This commit is contained in:
@@ -11,10 +11,11 @@ impl Backend {
|
||||
pub(crate) async fn amount_participants(&self) -> i64 {
|
||||
match self {
|
||||
Backend::Sqlite(db) => {
|
||||
let row = sqlx::query!("SELECT COUNT(*) as count FROM client")
|
||||
.fetch_one(db)
|
||||
.await
|
||||
.unwrap();
|
||||
let row =
|
||||
sqlx::query!("SELECT COUNT(DISTINCT client_uuid) AS count FROM sightings; ")
|
||||
.fetch_one(db)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
row.count
|
||||
}
|
||||
|
Reference in New Issue
Block a user