Skip to content

Commit 2b10edc

Browse files
committed
fix: updates the path parameter.
Axum updated the matchit crate. Which has a breaking change on the path parameter syntax. This commit fixes the code to follow the new syntax. Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
1 parent fc9a515 commit 2b10edc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ impl PolicyServer {
203203
};
204204

205205
let mut router = Router::new()
206-
.route("/audit/:policy_id", post(audit_handler))
207-
.route("/validate/:policy_id", post(validate_handler))
208-
.route("/validate_raw/:policy_id", post(validate_raw_handler))
206+
.route("/audit/{policy_id}", post(audit_handler))
207+
.route("/validate/{policy_id}", post(validate_handler))
208+
.route("/validate_raw/{policy_id}", post(validate_raw_handler))
209209
.with_state(state.clone())
210210
.layer(
211211
TraceLayer::new_for_http()

0 commit comments

Comments
 (0)