From 7805eaa3cb483f9c8a853e8f17cd684d739021dc Mon Sep 17 00:00:00 2001 From: Accusys Date: Fri, 22 May 2026 09:33:33 +0800 Subject: [PATCH] fix: doc-wasm hardcoded path momentry_core_0.1 -> momentry_core --- src/api/docs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"));