Function
add
(State(ctx): State<AppContext>, Json(params): Json<Params>)
Source from the content-addressed store, hash-verified
| 32 | |
| 33 | #[debug_handler] |
| 34 | pub 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] |
| 44 | pub async fn update( |
Callers
nothing calls this directly
Tested by
no test coverage detected