Function
add
(State(ctx): State<AppContext>, Json(params): Json<Params>)
Source from the content-addressed store, hash-verified
| 29 | } |
| 30 | |
| 31 | pub async fn add(State(ctx): State<AppContext>, Json(params): Json<Params>) -> Result<Response> { |
| 32 | let mut item = ActiveModel { |
| 33 | ..Default::default() |
| 34 | }; |
| 35 | params.update(&mut item); |
| 36 | let item = item.insert(&ctx.db).await?; |
| 37 | format::json(item) |
| 38 | } |
| 39 | |
| 40 | pub async fn update( |
| 41 | Path(id): Path<i32>, |
Callers
nothing calls this directly
Tested by
no test coverage detected