more sweeping
This commit is contained in:
+4
-6
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user