(
State(state): State<Arc<ServerState>>,
Path(id): Path<String>,
)
| 415 | } |
| 416 | |
| 417 | async fn get_session( |
| 418 | State(state): State<Arc<ServerState>>, |
| 419 | Path(id): Path<String>, |
| 420 | ) -> Result<Json<SessionInfo>> { |
| 421 | let sessions = state.sessions.lock().await; |
| 422 | let session = sessions |
| 423 | .get(&id) |
| 424 | .ok_or_else(|| ApiError::SessionNotFound(id))?; |
| 425 | Ok(Json(session_to_info(session))) |
| 426 | } |
| 427 | |
| 428 | async fn delete_session( |
| 429 | State(state): State<Arc<ServerState>>, |
nothing calls this directly
no test coverage detected