(state: Data<&AppState>)
| 66 | |
| 67 | #[handler] |
| 68 | async fn new(state: Data<&AppState>) -> Result<impl IntoResponse> { |
| 69 | let ctx = tera::Context::new(); |
| 70 | let body = state |
| 71 | .templates |
| 72 | .render("new.html.tera", &ctx) |
| 73 | .map_err(InternalServerError)?; |
| 74 | Ok(Html(body)) |
| 75 | } |
| 76 | |
| 77 | #[handler] |
| 78 | async fn edit(state: Data<&AppState>, Path(id): Path<i32>) -> Result<impl IntoResponse> { |
no outgoing calls