Skip to content

Commit

Permalink
- added /status endpont to server.
Browse files Browse the repository at this point in the history
  • Loading branch information
laststylebender14 committed Sep 18, 2024
1 parent 5ce342c commit a955d2d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/http/request_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@ async fn handle_request_inner<T: DeserializeOwned + GraphQLRequestLike>(
}
};

if req.uri().path() == "/status" {
let status_response = Response::builder()
.status(StatusCode::OK)
.header(CONTENT_TYPE, "application/json")
.body(Body::from(r#"{"message": "ready"}"#))?;
return Ok(status_response);
}

Check warning on line 341 in src/core/http/request_handler.rs

View check run for this annotation

Codecov / codecov/patch

src/core/http/request_handler.rs#L334-L341

Added lines #L334 - L341 were not covered by tests
not_found()
}
_ => not_found(),
Expand Down

0 comments on commit a955d2d

Please sign in to comment.