(
store: Store,
question: Question,
)
| 47 | } |
| 48 | |
| 49 | pub async fn add_question( |
| 50 | store: Store, |
| 51 | question: Question, |
| 52 | ) -> Result<impl warp::Reply, warp::Rejection> { |
| 53 | store |
| 54 | .questions |
| 55 | .write() |
| 56 | .await |
| 57 | .insert(question.clone().id, question); |
| 58 | |
| 59 | Ok(warp::reply::with_status("Question added", StatusCode::OK)) |
| 60 | } |
nothing calls this directly
no outgoing calls
no test coverage detected