Skip to content

Commit

Permalink
src: lib: Update routing to match new axum
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Jan 7, 2025
1 parent b214585 commit a70b143
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/web/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static HTML_DIST: Dir = include_dir!("$CARGO_MANIFEST_DIR/src/webpage/dist");
pub fn router() -> Router {
let app = Router::new()
.route_service("/", get(root))
.route("/:path", get(root))
.route_service("/{*path}", get(root))
.nest("/v1", v1::router())
.fallback(handle_404())
.layer(CorsLayer::permissive())
Expand Down
4 changes: 2 additions & 2 deletions src/lib/web/routes/v1/rest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ pub fn router() -> Router {
"/mavlink",
get(mavlink::mavlink).post(mavlink::post_mavlink),
)
.route("/mavlink/*path", get(mavlink::mavlink))
.route("/mavlink/{*path}", get(mavlink::mavlink))
.route(
"/mavlink/message_id_from_name/*name",
"/mavlink/message_id_from_name/{*name}",
get(mavlink::message_id_from_name),
)
}

0 comments on commit a70b143

Please sign in to comment.