bugfix: default bandwidth response for authenticator
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -353,7 +353,7 @@ impl AuthenticatorClient {
|
||||
);
|
||||
}
|
||||
Ok(AvailableBandwidthClientResponse {
|
||||
available_bandwidth_bytes: None,
|
||||
available_bandwidth_bytes: Some(available_bandwidth),
|
||||
current_upgrade_mode_status,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user