From bd9702491009d2ad9c978295cccc733cbd230061 Mon Sep 17 00:00:00 2001 From: Thomas Marchand Date: Sun, 14 Dec 2025 21:19:04 +0000 Subject: [PATCH] Fix axum route syntax (:id instead of {id}) - Routes now work correctly in axum 0.7 - Tested end-to-end: agent successfully creates files via LLM tool calls --- src/api/routes.rs | 4 ++-- test_workspace/hello.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 test_workspace/hello.py diff --git a/src/api/routes.rs b/src/api/routes.rs index c18052e..bef6f21 100644 --- a/src/api/routes.rs +++ b/src/api/routes.rs @@ -44,8 +44,8 @@ pub async fn serve(config: Config) -> anyhow::Result<()> { let app = Router::new() .route("/api/health", get(health)) .route("/api/task", post(create_task)) - .route("/api/task/{id}", get(get_task)) - .route("/api/task/{id}/stream", get(stream_task)) + .route("/api/task/:id", get(get_task)) + .route("/api/task/:id/stream", get(stream_task)) .layer(CorsLayer::permissive()) .layer(TraceLayer::new_for_http()) .with_state(state); diff --git a/test_workspace/hello.py b/test_workspace/hello.py new file mode 100644 index 0000000..ad35e5a --- /dev/null +++ b/test_workspace/hello.py @@ -0,0 +1 @@ +print("Hello World")