(bundle_id: &str)
| 404 | } |
| 405 | |
| 406 | fn validate_bundle_id(bundle_id: &str) -> Result<(), AppError> { |
| 407 | let valid = !bundle_id.is_empty() |
| 408 | && bundle_id |
| 409 | .chars() |
| 410 | .all(|c| c.is_ascii_alphanumeric() || c == '.' || c == '-' || c == '_'); |
| 411 | if valid { |
| 412 | Ok(()) |
| 413 | } else { |
| 414 | Err(AppError::bad_request("Invalid bundle identifier.")) |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | fn enrich_status(udid: &str, status: &mut Value) { |
| 419 | let Some(object) = status.as_object_mut() else { |
no test coverage detected