20260718 格式化查询服务代码

This commit is contained in:
2026-07-18 10:40:51 +08:00
parent a5902c0a5e
commit c48dc04909
2 changed files with 9 additions and 4 deletions

View File

@@ -2104,8 +2104,14 @@ fn object_filter_from_query(query: &BTreeMap<String, String>) -> Result<ObjectFi
filter.object_type = Some(normalized.to_string());
}
if let Some(value) = query.get("result") {
if !matches!(value.to_ascii_lowercase().as_str(), "ok" | "error" | "skipped") {
return Err(ApiError::new(400, format!("invalid result filter: {value}")));
if !matches!(
value.to_ascii_lowercase().as_str(),
"ok" | "error" | "skipped"
) {
return Err(ApiError::new(
400,
format!("invalid result filter: {value}"),
));
}
filter.result = Some(value.clone());
}