Function
index
(hb: web::Data<Handlebars<'_>>)
Source from the content-addressed store, hash-verified
| 14 | |
| 15 | #[get("/")] |
| 16 | async fn index(hb: web::Data<Handlebars<'_>>) -> impl Responder { |
| 17 | let data = json!({ |
| 18 | "name": "Handlebars" |
| 19 | }); |
| 20 | let body = hb.render("index", &data).unwrap(); |
| 21 | |
| 22 | web::Html::new(body) |
| 23 | } |
| 24 | |
| 25 | #[get("/{user}/{data}")] |
| 26 | async fn user(hb: web::Data<Handlebars<'_>>, path: web::Path<(String, String)>) -> impl Responder { |
Callers
nothing calls this directly
Tested by
no test coverage detected