diff --git a/server/Cargo.toml b/server/Cargo.toml index 7181ba3..0088c2c 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -39,3 +39,4 @@ tempfile = "3.27.0" [[bin]] name = "test_rmcp" path = "src/bin_test.rs" + diff --git a/server/src/main.rs b/server/src/main.rs index 98a20e0..44cea5b 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -297,8 +297,8 @@ async fn run_server(state: Arc) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box>() - }); - axum::Json(serde_json::json!(activities)) + let activities_json = state_clone.recent_activities.read_with(|a| serde_json::to_string(a).unwrap_or_else(|_| "[]".to_string())); + ([(axum::http::header::CONTENT_TYPE, "application/json")], activities_json) } }), )