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:
@ -61,7 +61,7 @@ async fn index(
|
||||
},
|
||||
)
|
||||
} else {
|
||||
tmpl_env.render("index.html", ())
|
||||
tmpl_env.render("index.html", minijinja::Value::UNDEFINED)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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]
|
||||
|
Reference in New Issue
Block a user