(Json(req): Json<RemoveWorktreeRequest>)
| 4191 | } |
| 4192 | |
| 4193 | async fn remove_worktree(Json(req): Json<RemoveWorktreeRequest>) -> Result<Json<bool>> { |
| 4194 | let cwd = std::env::current_dir().map_err(|e| ApiError::BadRequest(e.to_string()))?; |
| 4195 | |
| 4196 | worktree::remove_worktree(&cwd, &req.path, req.force.unwrap_or(false)) |
| 4197 | .map_err(|e| ApiError::BadRequest(e.to_string()))?; |
| 4198 | |
| 4199 | Ok(Json(true)) |
| 4200 | } |
| 4201 | |
| 4202 | async fn reset_worktree() -> Result<Json<bool>> { |
| 4203 | let cwd = std::env::current_dir().map_err(|e| ApiError::BadRequest(e.to_string()))?; |
nothing calls this directly
no outgoing calls
no test coverage detected