fixed compatibility with 'skimmed' endpoints by making "no_legacy" argument optional

This commit is contained in:
Jędrzej Stuczyński
2024-10-14 14:51:02 +01:00
parent c14481bb77
commit 11f6db5304
2 changed files with 3 additions and 3 deletions
@@ -81,7 +81,7 @@ struct NodesParamsWithRole {
role: Option<NodeRoleQueryParam>,
semver_compatibility: Option<String>,
no_legacy: bool,
no_legacy: Option<bool>,
page: Option<u32>,
per_page: Option<u32>,
}
@@ -89,7 +89,7 @@ struct NodesParamsWithRole {
#[derive(Debug, Deserialize, utoipa::IntoParams)]
struct NodesParams {
semver_compatibility: Option<String>,
no_legacy: bool,
no_legacy: Option<bool>,
page: Option<u32>,
per_page: Option<u32>,
}
@@ -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(),