(
State(state): State<Arc<ServerState>>,
Path(id): Path<String>,
)
| 678 | } |
| 679 | |
| 680 | async fn clear_session_revert( |
| 681 | State(state): State<Arc<ServerState>>, |
| 682 | Path(id): Path<String>, |
| 683 | ) -> Result<Json<SessionInfo>> { |
| 684 | let mut sessions = state.sessions.lock().await; |
| 685 | let updated = sessions |
| 686 | .clear_revert(&id) |
| 687 | .ok_or_else(|| ApiError::SessionNotFound(id.clone()))?; |
| 688 | let info = session_to_info(&updated); |
| 689 | drop(sessions); |
| 690 | persist_sessions_if_enabled(&state).await; |
| 691 | Ok(Json(info)) |
| 692 | } |
| 693 | |
| 694 | async fn start_compaction( |
| 695 | State(state): State<Arc<ServerState>>, |
nothing calls this directly
no test coverage detected