forgot to allow aggregate global stats

This commit is contained in:
yenicelik 2023-06-25 16:18:09 -04:00
parent f3ad6b9c17
commit 992860a46d

View File

@ -57,6 +57,7 @@ pub async fn query_user_stats<'a>(
// In any case, we don't allow stats if the target user does not have a balance
// No subuser, we can check the balance directly
if user_id != 0 {
match balance::Entity::find()
.filter(balance::Column::UserId.eq(user_id))
.one(db_replica.as_ref())
@ -109,6 +110,7 @@ pub async fn query_user_stats<'a>(
}
}
}
}
// TODO: have a getter for this. do we need a connection pool on it?
let influxdb_client = app