forgot to allow aggregate global stats
This commit is contained in:
parent
f3ad6b9c17
commit
992860a46d
@ -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
|
// 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
|
// No subuser, we can check the balance directly
|
||||||
|
if user_id != 0 {
|
||||||
match balance::Entity::find()
|
match balance::Entity::find()
|
||||||
.filter(balance::Column::UserId.eq(user_id))
|
.filter(balance::Column::UserId.eq(user_id))
|
||||||
.one(db_replica.as_ref())
|
.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?
|
// TODO: have a getter for this. do we need a connection pool on it?
|
||||||
let influxdb_client = app
|
let influxdb_client = app
|
||||||
|
Loading…
Reference in New Issue
Block a user