diff --git a/src/api/server.rs b/src/api/server.rs index cc055d9..02fba7b 100644 --- a/src/api/server.rs +++ b/src/api/server.rs @@ -765,7 +765,7 @@ async fn health_detailed(State(state): State) -> Json axum::response::Redirect { async fn wasm_doc_handler() -> Result { let path = - std::path::Path::new("/Users/accusys/momentry_core_0.1/docs_v1.0/doc_wasm/index.html"); + std::path::Path::new("/Users/accusys/momentry_core/docs_v1.0/doc_wasm/index.html"); match tokio::fs::read_to_string(path).await { Ok(html) => Ok(([("content-type", "text/html; charset=utf-8")], html)), Err(_) => Err((StatusCode::NOT_FOUND, "Doc not found")), @@ -3910,7 +3910,7 @@ async fn wasm_doc_file_handler( if file.contains("..") || file.contains("//") { return Err((StatusCode::NOT_FOUND, "Invalid path")); } - let base = std::path::Path::new("/Users/accusys/momentry_core_0.1/docs_v1.0/doc_wasm"); + let base = std::path::Path::new("/Users/accusys/momentry_core/docs_v1.0/doc_wasm"); let path = base.join(&file); if !path.exists() || !path.starts_with(base) { return Err((StatusCode::NOT_FOUND, "File not found")); @@ -3961,7 +3961,7 @@ async fn serve_doc( mode: Option<&str>, ) -> Result { let authorized = check_doc_auth(state, headers).await; - let project_root = std::path::Path::new("/Users/accusys/momentry_core_0.1"); + let project_root = std::path::Path::new("/Users/accusys/momentry_core"); let base_dir = match mode { Some("dev") => project_root.join("docs_v1.0").join("doc_developer"), _ => project_root.join("docs_v1.0").join("doc"), @@ -3990,7 +3990,7 @@ async fn serve_doc_file( file: &str, ) -> Result { let authorized = check_doc_auth(state, headers).await; - let project_root = std::path::Path::new("/Users/accusys/momentry_core_0.1"); + let project_root = std::path::Path::new("/Users/accusys/momentry_core"); let base_dir = match mode { Some("dev") => project_root.join("docs_v1.0").join("doc_developer"), _ => project_root.join("docs_v1.0").join("doc"),