(
State(state): State<AppState>,
Path(udid): Path<String>,
)
| 2208 | } |
| 2209 | |
| 2210 | async fn erase_simulator( |
| 2211 | State(state): State<AppState>, |
| 2212 | Path(udid): Path<String>, |
| 2213 | ) -> Result<Json<Value>, AppError> { |
| 2214 | if android::is_android_id(&udid) { |
| 2215 | let action_udid = udid.clone(); |
| 2216 | run_android_action(state, move |android| android.erase(&action_udid)).await?; |
| 2217 | return Ok(json(json_value!({ "ok": true }))); |
| 2218 | } |
| 2219 | forget_lifecycle_session(&state, &udid); |
| 2220 | let action_udid = udid.clone(); |
| 2221 | run_bridge_action(state, move |bridge| bridge.erase_simulator(&action_udid)).await?; |
| 2222 | Ok(json(json_value!({ "ok": true }))) |
| 2223 | } |
| 2224 | |
| 2225 | fn forget_lifecycle_session(state: &AppState, udid: &str) { |
| 2226 | // SimulatorKit can reset the server-side connection if a cached private |
nothing calls this directly
no test coverage detected