summaryrefslogtreecommitdiffstats
path: root/src/api.rs
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-10-01 13:15:24 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-10-01 13:15:24 -0500
commitfe16a923190243dfde5db6ceff2ef0bcf9158926 (patch)
tree9b8b616e1972ca3ef6e28d29c980899af3ddde49 /src/api.rs
parente1d9c956beb6921b0d549248bea3a6853fde5f46 (diff)
feat: simplify service status type
Diffstat (limited to 'src/api.rs')
-rw-r--r--src/api.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api.rs b/src/api.rs
index 1489c21..5a8deb6 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -45,12 +45,12 @@ pub async fn healthcheck(State(services): State<ServiceHandles>) -> Health {
let status = match checks
.values()
- .filter(|s| !matches!(s, Status::Pass))
+ .filter(|s| !matches!(s, Status::Ok))
.count()
{
- 0 => Status::Pass,
- 1 => Status::Fail(Some("1 issue detected".to_string())),
- n => Status::Fail(Some(format!("{n} issues detected"))),
+ 0 => Status::Ok,
+ 1 => Status::Error(Some("1 issue detected".to_string())),
+ n => Status::Error(Some(format!("{n} issues detected"))),
};
Health { status, checks }