only count those who have found at least 1 cam as participant

This commit is contained in:
2025-08-22 08:51:37 +02:00
parent 7cd5107c8a
commit 52efb51a3c
3 changed files with 7 additions and 6 deletions

View File

@@ -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
}