(
store: Store,
new_question: NewQuestion,
)
| 54 | } |
| 55 | |
| 56 | pub async fn add_question( |
| 57 | store: Store, |
| 58 | new_question: NewQuestion, |
| 59 | ) -> Result<impl warp::Reply, warp::Rejection> { |
| 60 | match store.add_question(new_question).await { |
| 61 | Ok(_) => { |
| 62 | Ok(warp::reply::with_status("Question added", StatusCode::OK)) |
| 63 | } |
| 64 | Err(e) => Err(warp::reject::custom(e)), |
| 65 | } |
| 66 | } |
nothing calls this directly
no test coverage detected