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

Function add

examples/loco_seaography/src/controllers/notes.rs:34–41  ·  view source on GitHub ↗
(State(ctx): State<AppContext>, Json(params): Json<Params>)

Source from the content-addressed store, hash-verified

32
33#[debug_handler]
34pub async fn add(State(ctx): State<AppContext>, Json(params): Json<Params>) -> Result<Response> {
35 let mut item = ActiveModel {
36 ..Default::default()
37 };
38 params.update(&mut item);
39 let item = item.insert(&ctx.db).await?;
40 format::json(item)
41}
42
43#[debug_handler]
44pub async fn update(

Callers

nothing calls this directly

Calls 3

jsonFunction · 0.85
updateMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected