more sweeping

This commit is contained in:
lda
2026-04-04 07:45:55 +07:00 Unverified
parent 0b3baa4f1b
commit 4bb8fa161d
2 changed files with 4 additions and 6 deletions
+4 -6
View File
@@ -11,12 +11,10 @@ pub struct DhcpLeasesQueryRaw {
include_state: Option<String>, include_state: Option<String>,
} }
pub async fn get_dhcp_leases(Query(raw): Query<DhcpLeasesQueryRaw>) -> impl IntoResponse { pub async fn get_dhcp_leases(
let include_state = raw Query(DhcpLeasesQueryRaw { include_state }): Query<DhcpLeasesQueryRaw>,
.include_state ) -> impl IntoResponse {
.as_deref() let include_state = include_state.as_deref().map(boolish_str).unwrap_or(false);
.map(boolish_str)
.unwrap_or(false);
match read_dhcp_leases_with_names().await { match read_dhcp_leases_with_names().await {
Ok(leases_with_names) => { Ok(leases_with_names) => {