Created
October 12, 2021 18:12
-
-
Save tjmaynes/4e0f97757e2161a4aaf2b594d02f27a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
if is_database_connected { | |
HttpResponse::Ok() | |
.content_type("application/json") | |
.body(serde_json::json!({ "database_connected": is_database_connected }).to_string()) | |
} else { | |
HttpResponse::ServiceUnavailable() | |
.content_type("application/json") | |
.body(serde_json::json!({ "database_connected": is_database_connected }).to_string()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment