Function
user
(
hb: web::Data<Handlebars<'_>>,
Path(info): Path<(String, String)>,
lang: LangChoice,
)
Source from the content-addressed store, hash-verified
| 37 | |
| 38 | #[get("/{user}/{data}")] |
| 39 | async fn user( |
| 40 | hb: web::Data<Handlebars<'_>>, |
| 41 | Path(info): Path<(String, String)>, |
| 42 | lang: LangChoice, |
| 43 | ) -> impl Responder { |
| 44 | let data = json!({ |
| 45 | "lang": lang, |
| 46 | "user": info.0, |
| 47 | "data": info.1 |
| 48 | }); |
| 49 | let body = hb.render("user", &data).unwrap(); |
| 50 | web::Html::new(body) |
| 51 | } |
| 52 | |
| 53 | #[actix_web::main] |
| 54 | async fn main() -> io::Result<()> { |
Callers
nothing calls this directly
Tested by
no test coverage detected