diff --git a/filed/src/web/forms.rs b/filed/src/web/forms.rs index d8d8bf9..6ebe2b5 100644 --- a/filed/src/web/forms.rs +++ b/filed/src/web/forms.rs @@ -52,7 +52,9 @@ pub async fn upload(form: FormData, state: SharedState) -> Result return Ok(Box::new( warp::reply::with_status( warp::reply::html( - BadActionReq {} + BadActionReq { + env: state.env.clone() + } .render() .map_err(|err| warp::reject::custom(HttpReject::AskamaError(err.into())))? ), diff --git a/filed/src/web/pages.rs b/filed/src/web/pages.rs index 6a454fb..5e7b33a 100644 --- a/filed/src/web/pages.rs +++ b/filed/src/web/pages.rs @@ -14,13 +14,13 @@ use super::{state::SharedState, rejection::HttpReject}; #[derive(Template)] #[template( path = "index.html" )] pub struct Index { - env: Env + pub env: Env } #[derive(Template)] #[template( path = "bad_action_req.html" )] pub struct BadActionReq { - env: Env + pub env: Env } #[derive(Template)] @@ -28,7 +28,7 @@ pub struct BadActionReq { #[allow(dead_code)] pub struct Uploaded { file: String, - env: Env + pub env: Env }