MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / update_question

Function update_question

ch_07/src/routes/question.rs:32–41  ·  view source on GitHub ↗
(
    id: i32,
    store: Store,
    question: Question,
)

Source from the content-addressed store, hash-verified

30}
31
32pub 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
43pub async fn delete_question(
44 id: i32,

Callers

nothing calls this directly

Calls 1

update_questionMethod · 0.45

Tested by

no test coverage detected