(Json(req): Json<CreatePtyRequest>)
| 3404 | } |
| 3405 | |
| 3406 | async fn create_pty(Json(req): Json<CreatePtyRequest>) -> Result<Json<PtyInfo>> { |
| 3407 | let manager = get_pty_manager(); |
| 3408 | let session = manager |
| 3409 | .create_session(&req.command, req.cwd.as_deref(), req.env) |
| 3410 | .await |
| 3411 | .map_err(|e| ApiError::BadRequest(e.to_string()))?; |
| 3412 | Ok(Json(PtyInfo::from(session))) |
| 3413 | } |
| 3414 | |
| 3415 | async fn get_pty(Path(id): Path<String>) -> Result<Json<PtyInfo>> { |
| 3416 | let manager = get_pty_manager(); |
nothing calls this directly
no test coverage detected