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

Function delete_question

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

Source from the content-addressed store, hash-verified

41}
42
43pub 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
56pub async fn add_question(
57 store: Store,

Callers

nothing calls this directly

Calls 1

delete_questionMethod · 0.45

Tested by

no test coverage detected