Skip to content

Commit

Permalink
Merge pull request #2 from samuelba/fix/status-check
Browse files Browse the repository at this point in the history
fix status check
  • Loading branch information
samuelba authored Apr 4, 2023
2 parents 18df0a9 + bbc582c commit d2536e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "healthcheck"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ async fn main() {
let res = client.get(url).send().await;
match res {
Ok(res) => {
if res.status() < reqwest::StatusCode::OK
|| res.status() >= reqwest::StatusCode::MULTIPLE_CHOICES
{
if !res.status().is_success() {
exit(1)
}
exit(0)
Expand Down

0 comments on commit d2536e3

Please sign in to comment.