From 07a287cc1348f99c802da7077f0fe5b49ae5bedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 30 Nov 2023 21:09:31 -0300 Subject: [PATCH] server: Fix endpoint not working MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/server.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index 9bc89a4..2ec64a8 100644 --- a/src/server.rs +++ b/src/server.rs @@ -60,8 +60,9 @@ pub fn run(server_address: &str, mavlink_vehicle: &MAVLinkVehicleArcMutex) { web::get().to(endpoints::root), ) .route("/info", web::get().to(endpoints::info)) - .service(default) + // Be sure to have default as the latest endpoint, otherwise it does not work .service(v1) + .service(default) .build() }) .bind(server_address)