(
State(state): State<Arc<ServerState>>,
Path(id): Path<String>,
)
| 519 | } |
| 520 | |
| 521 | async fn unshare_session( |
| 522 | State(state): State<Arc<ServerState>>, |
| 523 | Path(id): Path<String>, |
| 524 | ) -> Result<Json<serde_json::Value>> { |
| 525 | let mut sessions = state.sessions.lock().await; |
| 526 | sessions |
| 527 | .unshare(&id) |
| 528 | .ok_or_else(|| ApiError::SessionNotFound(id.clone()))?; |
| 529 | drop(sessions); |
| 530 | persist_sessions_if_enabled(&state).await; |
| 531 | Ok(Json(serde_json::json!({ "unshared": true }))) |
| 532 | } |
| 533 | |
| 534 | #[derive(Debug, Deserialize)] |
| 535 | pub struct ArchiveSessionRequest { |
nothing calls this directly
no test coverage detected