bugfix: default bandwidth response for authenticator

This commit is contained in:
Jędrzej Stuczyński
2025-10-28 10:26:12 +00:00
parent 17894e5f8b
commit fb29b6fde3
2 changed files with 11 additions and 1 deletions
@@ -32,6 +32,16 @@ impl From<bool> for CurrentUpgradeModeStatus {
}
}
impl From<CurrentUpgradeModeStatus> for Option<bool> {
fn from(value: CurrentUpgradeModeStatus) -> Self {
match value {
CurrentUpgradeModeStatus::Enabled => Some(true),
CurrentUpgradeModeStatus::Disabled => Some(false),
CurrentUpgradeModeStatus::Unknown => None,
}
}
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub struct BandwidthClaim {
pub credential: BandwidthCredential,
+1 -1
View File
@@ -353,7 +353,7 @@ impl AuthenticatorClient {
);
}
Ok(AvailableBandwidthClientResponse {
available_bandwidth_bytes: None,
available_bandwidth_bytes: Some(available_bandwidth),
current_upgrade_mode_status,
})
}