mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-12 19:56:48 +00:00
fix: Correctly sum total_queried_keys
This commit is contained in:
1 parent
7050ea84e3
commit
af8ca8580e
1 file changed
+2
-2
@@ -105,8 +105,8 @@ pub(crate) async fn get_remote_server_keys_batch_route(
|
||||
) -> Result<get_remote_server_keys_batch::v2::Response> {
|
||||
let total_queried_keys = body
|
||||
.server_keys
|
||||
.iter()
|
||||
.fold(0_usize, |acc, _| acc.saturating_add(1));
|
||||
.values()
|
||||
.fold(0_usize, |acc, q| acc.saturating_add(q.len()));
|
||||
|
||||
if total_queried_keys > MAX_KEYS_PER_QUERY {
|
||||
return Err!(Request(Forbidden(
|
||||
|
||||
Reference in new issue
Block a user