20260718 格式化查询服务代码
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user