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

Function delete

examples/poem_example/api/src/lib.rs:113–121  ·  view source on GitHub ↗
(state: Data<&AppState>, Path(id): Path<i32>)

Source from the content-addressed store, hash-verified

111
112#[handler]
113async fn delete(state: Data<&AppState>, Path(id): Path<i32>) -> Result<impl IntoResponse> {
114 let conn = &state.conn;
115
116 MutationCore::delete_post(conn, id)
117 .await
118 .map_err(InternalServerError)?;
119
120 Ok(StatusCode::FOUND.with_header("location", "/"))
121}
122
123#[tokio::main]
124async fn start() -> std::io::Result<()> {

Callers 5

deleteMethod · 0.50
downMethod · 0.50
routesFunction · 0.50
routesFunction · 0.50
routesFunction · 0.50

Calls 1

delete_postFunction · 0.85

Tested by 1

downMethod · 0.40