diff --git a/src/api/docs.rs b/src/api/docs.rs index 9a51a8b..1f52c6b 100644 --- a/src/api/docs.rs +++ b/src/api/docs.rs @@ -9,7 +9,7 @@ async fn doc_redirect() -> 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")), @@ -22,7 +22,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"));