From 11f6db5304e0a1ca2c2d9fa3823bd666cb70ce94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 14 Oct 2024 14:51:02 +0100 Subject: [PATCH] fixed compatibility with 'skimmed' endpoints by making "no_legacy" argument optional --- nym-api/src/nym_nodes/handlers/unstable/mod.rs | 4 ++-- nym-api/src/nym_nodes/handlers/unstable/skimmed.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nym-api/src/nym_nodes/handlers/unstable/mod.rs b/nym-api/src/nym_nodes/handlers/unstable/mod.rs index add55ec427..a9110a599d 100644 --- a/nym-api/src/nym_nodes/handlers/unstable/mod.rs +++ b/nym-api/src/nym_nodes/handlers/unstable/mod.rs @@ -81,7 +81,7 @@ struct NodesParamsWithRole { role: Option, semver_compatibility: Option, - no_legacy: bool, + no_legacy: Option, page: Option, per_page: Option, } @@ -89,7 +89,7 @@ struct NodesParamsWithRole { #[derive(Debug, Deserialize, utoipa::IntoParams)] struct NodesParams { semver_compatibility: Option, - no_legacy: bool, + no_legacy: Option, page: Option, per_page: Option, } diff --git a/nym-api/src/nym_nodes/handlers/unstable/skimmed.rs b/nym-api/src/nym_nodes/handlers/unstable/skimmed.rs index df263d2e06..53dace0e09 100644 --- a/nym-api/src/nym_nodes/handlers/unstable/skimmed.rs +++ b/nym-api/src/nym_nodes/handlers/unstable/skimmed.rs @@ -143,7 +143,7 @@ where ); // 5. if we allow legacy nodes, repeat the procedure for them, otherwise return just nym-nodes - if query_params.no_legacy { + if let Some(true) = query_params.no_legacy { // min of all caches let refreshed_at = refreshed_at([ rewarded_set.timestamp(),