1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

chore: update actix-multipart to v0.7

This commit is contained in:
Rob Ede
2024-07-07 00:59:16 +01:00
parent a67c7803e6
commit 8baa0767a6
5 changed files with 15 additions and 15 deletions

View File

@ -15,7 +15,7 @@ async fn index(
tmpl: web::Data<tera::Tera>,
query: web::Query<HashMap<String, String>>,
) -> Result<impl Responder, Error> {
let s = if let Some(name) = query.get("name") {
let html = if let Some(name) = query.get("name") {
// submitted form
let mut ctx = tera::Context::new();
ctx.insert("name", name);
@ -27,7 +27,7 @@ async fn index(
.map_err(|_| error::ErrorInternalServerError("Template error"))?
};
Ok(web::Html::new(s))
Ok(web::Html::new(html))
}
#[actix_web::main]