This commit is contained in:
2023-11-26 20:32:45 +01:00
parent 59ab0b7393
commit 933239a52d
7 changed files with 148 additions and 45 deletions

View File

@@ -9,7 +9,8 @@ use crate::{PresentationConfig, services::cv::fetch_cv_data_from_backend, CVBack
#[derive(Serialize, Debug)]
struct RootPage {
static_host: String,
cv: CV
cv: CV,
download_cv_url: String,
}
#[get("/")]
@@ -17,7 +18,8 @@ pub async fn index(presentation_config: &State<PresentationConfig>, cv_config: &
let context = match fetch_cv_data_from_backend(cv_config.cv_backend_path.clone()).await {
Ok(cv) => RootPage {
static_host: presentation_config.static_route.clone(),
cv
cv,
download_cv_url: "FIXME!".to_string(),
},
Err(e) => {
error!("Can't fetch CV data from backend {:?}", e);