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

Function load_item

examples/loco_seaography/src/controllers/notes.rs:23–26  ·  view source on GitHub ↗
(ctx: &AppContext, id: i32)

Source from the content-addressed store, hash-verified

21}
22
23async fn load_item(ctx: &AppContext, id: i32) -> Result<Model> {
24 let item = Entity::find_by_id(id).one(&ctx.db).await?;
25 item.ok_or_else(|| Error::NotFound)
26}
27
28#[debug_handler]
29pub async fn list(State(ctx): State<AppContext>) -> Result<Response> {

Callers 3

updateFunction · 0.70
removeFunction · 0.70
get_oneFunction · 0.70

Calls 1

oneMethod · 0.45

Tested by

no test coverage detected