(
id: i32,
store: Store,
question: Question,
)
| 30 | } |
| 31 | |
| 32 | pub async fn update_question( |
| 33 | id: i32, |
| 34 | store: Store, |
| 35 | question: Question, |
| 36 | ) -> Result<impl warp::Reply, warp::Rejection> { |
| 37 | match store.update_question(question, id).await { |
| 38 | Ok(res) => Ok(warp::reply::json(&res)), |
| 39 | Err(e) => Err(warp::reject::custom(e)), |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | pub async fn delete_question( |
| 44 | id: i32, |
nothing calls this directly
no test coverage detected