From 4fdc213a056248c8c2943271d8f3eba9d74c72ad Mon Sep 17 00:00:00 2001 From: blek Date: Sun, 1 Oct 2023 21:45:12 +1000 Subject: [PATCH] fix compile errer --- filed/src/web/forms.rs | 4 +++- filed/src/web/pages.rs | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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 }