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
This commit is contained in:
Thomas Marchand
2025-12-14 21:19:04 +00:00
parent 6718437c0b
commit bd97024910
2 changed files with 3 additions and 2 deletions

View File

@@ -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);

1
test_workspace/hello.py Normal file
View File

@@ -0,0 +1 @@
print("Hello World")