fix compile errer
This commit is contained in:
parent
ce8737b0f5
commit
4fdc213a05
|
@ -52,7 +52,9 @@ pub async fn upload(form: FormData, state: SharedState) -> Result<Box<dyn Reply>
|
||||||
return Ok(Box::new(
|
return Ok(Box::new(
|
||||||
warp::reply::with_status(
|
warp::reply::with_status(
|
||||||
warp::reply::html(
|
warp::reply::html(
|
||||||
BadActionReq {}
|
BadActionReq {
|
||||||
|
env: state.env.clone()
|
||||||
|
}
|
||||||
.render()
|
.render()
|
||||||
.map_err(|err| warp::reject::custom(HttpReject::AskamaError(err.into())))?
|
.map_err(|err| warp::reject::custom(HttpReject::AskamaError(err.into())))?
|
||||||
),
|
),
|
||||||
|
|
|
@ -14,13 +14,13 @@ use super::{state::SharedState, rejection::HttpReject};
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
#[template( path = "index.html" )]
|
#[template( path = "index.html" )]
|
||||||
pub struct Index {
|
pub struct Index {
|
||||||
env: Env
|
pub env: Env
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
#[template( path = "bad_action_req.html" )]
|
#[template( path = "bad_action_req.html" )]
|
||||||
pub struct BadActionReq {
|
pub struct BadActionReq {
|
||||||
env: Env
|
pub env: Env
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
|
@ -28,7 +28,7 @@ pub struct BadActionReq {
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub struct Uploaded {
|
pub struct Uploaded {
|
||||||
file: String,
|
file: String,
|
||||||
env: Env
|
pub env: Env
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue