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

Function delete_question

ch_08/src/routes/question.rs:64–75  ·  view source on GitHub ↗
(
    id: i32,
    store: Store,
)

Source from the content-addressed store, hash-verified

62}
63
64pub 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
77pub async fn add_question(
78 store: Store,

Callers

nothing calls this directly

Calls 1

delete_questionMethod · 0.45

Tested by

no test coverage detected