Function
delete_question
(id: String, store: Store)
Source from the content-addressed store, hash-verified
| 174 | } |
| 175 | |
| 176 | async fn delete_question(id: String, store: Store) -> Result<impl warp::Reply, warp::Rejection> { |
| 177 | match store.questions.write().await.remove(&QuestionId(id)) { |
| 178 | Some(_) => return Ok(warp::reply::with_status("Question deleted", StatusCode::OK)), |
| 179 | None => return Err(warp::reject::custom(Error::QuestionNotFound)), |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | async fn add_answer( |
| 184 | store: Store, |
Callers
nothing calls this directly
Tested by
no test coverage detected