(
id: i32,
store: Store,
)
| 41 | } |
| 42 | |
| 43 | pub async fn delete_question( |
| 44 | id: i32, |
| 45 | store: Store, |
| 46 | ) -> Result<impl warp::Reply, warp::Rejection> { |
| 47 | match store.delete_question(id).await { |
| 48 | Ok(_) => Ok(warp::reply::with_status( |
| 49 | format!("Question {} deleted", id), |
| 50 | StatusCode::OK, |
| 51 | )), |
| 52 | Err(e) => Err(warp::reject::custom(e)), |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | pub async fn add_question( |
| 57 | store: Store, |
nothing calls this directly
no test coverage detected