(
id: i32,
store: Store,
)
| 62 | } |
| 63 | |
| 64 | pub async fn delete_question( |
| 65 | id: i32, |
| 66 | store: Store, |
| 67 | ) -> Result<impl warp::Reply, warp::Rejection> { |
| 68 | match store.delete_question(id).await { |
| 69 | Ok(_) => Ok(warp::reply::with_status( |
| 70 | format!("Question {} deleted", id), |
| 71 | StatusCode::OK, |
| 72 | )), |
| 73 | Err(e) => Err(warp::reject::custom(e)), |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | pub async fn add_question( |
| 78 | store: Store, |
nothing calls this directly
no test coverage detected