summaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-09-27 12:16:23 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-09-27 12:16:23 -0500
commit1218705fd52771a902eb6c64762623d0c6a13173 (patch)
treeafdded96bff04b8e22704e54dedff5bf78e28229 /src/api
parentfd992d7e3c03f37fbcafe9d3f26c72a2ead3b2a7 (diff)
refactor: merge Check into Status type
Diffstat (limited to 'src/api')
-rw-r--r--src/api/services.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/services.rs b/src/api/services.rs
index 59e891f..63018f1 100644
--- a/src/api/services.rs
+++ b/src/api/services.rs
@@ -7,7 +7,7 @@ use axum::{
use axum_extra::routing::Resource;
use serde::{Deserialize, Serialize};
-use crate::{service::Services, Check, Error, Status};
+use crate::{service::Services, Error, Status};
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ServiceQuery {
@@ -22,7 +22,7 @@ pub fn router() -> Router<Services> {
pub async fn index(
Query(query): Query<ServiceQuery>,
State(services): State<Services>,
-) -> Result<Json<HashMap<String, Check>>, Error> {
+) -> Result<Json<HashMap<String, Status>>, Error> {
services
.check_filtered(|name| (!query.name.as_ref().is_some_and(|s| s != name)))
.await
@@ -32,7 +32,7 @@ pub async fn index(
pub async fn show(
Path(name): Path<String>,
State(services): State<Services>,
-) -> Result<Check, Error> {
+) -> Result<Status, Error> {
services
.check_one(&name)
.await