Skip to content

Commit 5dfa0c1

Browse files
committed
fix: use :id path params for Axum 0.7 (not {id} which is 0.8)
1 parent 2b90ee1 commit 5dfa0c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/handlers.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ pub fn router(state: Arc<AppState>) -> Router {
4646
.route("/upload-agent", post(upload_agent))
4747
.route("/agent-code", get(get_agent_code))
4848
.route("/submit", post(submit_batch))
49-
.route("/batch/{id}", get(get_batch))
50-
.route("/batch/{id}/tasks", get(get_batch_tasks))
51-
.route("/batch/{id}/task/{task_id}", get(get_task))
49+
.route("/batch/:id", get(get_batch))
50+
.route("/batch/:id/tasks", get(get_batch_tasks))
51+
.route("/batch/:id/task/:task_id", get(get_task))
5252
.route("/batches", get(list_batches))
53-
.route("/verify/{batch_id}", get(verify_batch))
53+
.route("/verify/:batch_id", get(verify_batch))
5454
.route("/instance", get(instance_info))
5555
.route("/dataset", get(fetch_dataset))
5656
.route("/submit_tasks", post(submit_tasks))

0 commit comments

Comments
 (0)