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>,
}
pub async fn get_dhcp_leases(Query(raw): Query<DhcpLeasesQueryRaw>) -> impl IntoResponse {
let include_state = raw
.include_state
.as_deref()
.map(boolish_str)
.unwrap_or(false);
pub async fn get_dhcp_leases(
Query(DhcpLeasesQueryRaw { include_state }): Query<DhcpLeasesQueryRaw>,
) -> impl IntoResponse {
let include_state = include_state.as_deref().map(boolish_str).unwrap_or(false);
match read_dhcp_leases_with_names().await {
Ok(leases_with_names) => {