diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2024-10-01 13:15:24 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2024-10-01 13:15:24 -0500 |
commit | fe16a923190243dfde5db6ceff2ef0bcf9158926 (patch) | |
tree | 9b8b616e1972ca3ef6e28d29c980899af3ddde49 /src/api.rs | |
parent | e1d9c956beb6921b0d549248bea3a6853fde5f46 (diff) |
feat: simplify service status type
Diffstat (limited to 'src/api.rs')
-rw-r--r-- | src/api.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 } |