MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / delete

Function delete

examples/rocket_example/api/src/lib.rs:105–113  ·  view source on GitHub ↗
(conn: Connection<Db>, id: i32)

Source from the content-addressed store, hash-verified

103
104#[delete("/<id>")]
105async fn delete(conn: Connection<Db>, id: i32) -> Flash<Redirect> {
106 let db = conn.into_inner();
107
108 Mutation::delete_post(&db, id)
109 .await
110 .expect("could not delete post");
111
112 Flash::success(Redirect::to("/"), "Post successfully deleted.")
113}
114
115#[delete("/")]
116async fn destroy(conn: Connection<Db>) -> Result<(), rocket::response::Debug<String>> {

Callers 1

routesFunction · 0.50

Calls 2

delete_postFunction · 0.85
into_innerMethod · 0.80

Tested by

no test coverage detected