Skip to content

Commit

Permalink
fix: updates the path parameter.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jvanz committed Jan 2, 2025
1 parent fc9a515 commit 2b10edc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ impl PolicyServer {
};

let mut router = Router::new()
.route("/audit/:policy_id", post(audit_handler))
.route("/validate/:policy_id", post(validate_handler))
.route("/validate_raw/:policy_id", post(validate_raw_handler))
.route("/audit/{policy_id}", post(audit_handler))
.route("/validate/{policy_id}", post(validate_handler))
.route("/validate_raw/{policy_id}", post(validate_raw_handler))

Check warning on line 208 in src/lib.rs

View check run for this annotation

Codecov / codecov/patch

src/lib.rs#L206-L208

Added lines #L206 - L208 were not covered by tests
.with_state(state.clone())
.layer(
TraceLayer::new_for_http()
Expand Down

0 comments on commit 2b10edc

Please sign in to comment.