(state: AppState, udid: String)
| 5556 | } |
| 5557 | |
| 5558 | async fn simulator_payload(state: AppState, udid: String) -> Result<Json<Value>, AppError> { |
| 5559 | if android::is_android_id(&udid) { |
| 5560 | return android_simulator_payload(state, udid).await; |
| 5561 | } |
| 5562 | let enriched = all_device_values(state.clone(), true).await?; |
| 5563 | let simulator = enriched |
| 5564 | .into_iter() |
| 5565 | .find(|entry| entry.get("udid").and_then(Value::as_str) == Some(udid.as_str())) |
| 5566 | .ok_or_else(|| AppError::not_found(format!("Unknown simulator {udid}")))?; |
| 5567 | Ok(json(json_value!({ "simulator": simulator }))) |
| 5568 | } |
| 5569 | |
| 5570 | async fn accessibility_snapshot( |
| 5571 | state: AppState, |
no test coverage detected