Function
user
(hb: web::Data<Handlebars<'_>>, path: web::Path<(String, String)>)
Source from the content-addressed store, hash-verified
| 24 | |
| 25 | #[get("/{user}/{data}")] |
| 26 | async fn user(hb: web::Data<Handlebars<'_>>, path: web::Path<(String, String)>) -> impl Responder { |
| 27 | let info = path.into_inner(); |
| 28 | let data = json!({ |
| 29 | "user": info.0, |
| 30 | "data": info.1 |
| 31 | }); |
| 32 | let body = hb.render("user", &data).unwrap(); |
| 33 | |
| 34 | web::Html::new(body) |
| 35 | } |
| 36 | |
| 37 | #[actix_web::main] |
| 38 | async fn main() -> io::Result<()> { |
Callers
nothing calls this directly
Tested by
no test coverage detected