fixed compatibility with 'skimmed' endpoints by making "no_legacy" argument optional
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user