From 4c62ba284508075bb20f3417154eaee073504c2e Mon Sep 17 00:00:00 2001 From: J-onasJones Date: Sun, 11 Feb 2024 06:28:44 +0100 Subject: [PATCH] added /status route --- src/server.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server.rs b/src/server.rs index 7aa133e..cdf5e6d 100644 --- a/src/server.rs +++ b/src/server.rs @@ -20,9 +20,13 @@ pub async fn serve() { let favicon = warp::path("favicon.ico").and(warp::fs::file("./src/favicon.png")); + // /status => 200 OK + let status = warp::path("status") + .map(|| warp::reply()); + // GET (any) => reply with return from handle_path - let routes = favicon.or(get_v1_routes()) - .recover(handle_rejection); + let routes = favicon.or(status.or(get_v1_routes()) + .recover(handle_rejection)); async fn handle_rejection(err: warp::Rejection) -> Result {