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

Function remove

examples/loco_example/src/controllers/notes.rs:52–55  ·  view source on GitHub ↗
(Path(id): Path<i32>, State(ctx): State<AppContext>)

Source from the content-addressed store, hash-verified

50}
51
52pub async fn remove(Path(id): Path<i32>, State(ctx): State<AppContext>) -> Result<Response> {
53 load_item(&ctx, id).await?.delete(&ctx.db).await?;
54 format::empty()
55}
56
57pub async fn get_one(Path(id): Path<i32>, State(ctx): State<AppContext>) -> Result<Response> {
58 format::json(load_item(&ctx, id).await?)

Callers

nothing calls this directly

Calls 2

load_itemFunction · 0.70
deleteMethod · 0.45

Tested by

no test coverage detected