Skip to content

Commit

Permalink
added GET method to /health endpoint (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
sh3ll3x3c authored Nov 1, 2023
1 parent 3ac6f6d commit beeed45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ pub struct Server {

fn health_route() -> impl Filter<Extract = impl Reply, Error = warp::Rejection> + Clone {
warp::head()
.or(warp::get())
.and(warp::path("health"))
.map(|| warp::reply::with_status("", warp::http::StatusCode::OK))
.map(|_| warp::reply::with_status("", warp::http::StatusCode::OK))
}

impl Server {
Expand Down

0 comments on commit beeed45

Please sign in to comment.