diff --git a/cli/src/api/endpoints.rs b/cli/src/api/endpoints.rs index c6b70c369..adbf22825 100644 --- a/cli/src/api/endpoints.rs +++ b/cli/src/api/endpoints.rs @@ -8,9 +8,9 @@ pub fn put_submit_package(api_uri: &str) -> String { format!("{api_uri}/{API_PATH}/job") } -/// GET /job/heartbeat +/// GET /health pub fn get_ping(api_uri: &str) -> String { - format!("{api_uri}/{API_PATH}/job/heartbeat") + format!("{api_uri}/{API_PATH}/health") } /// GET /job/ diff --git a/cli/src/api/mod.rs b/cli/src/api/mod.rs index 4fdd6a89c..c8a8c513e 100644 --- a/cli/src/api/mod.rs +++ b/cli/src/api/mod.rs @@ -165,7 +165,7 @@ impl PhylumApi { Ok(self .get::(endpoints::get_ping(&self.api_uri)) .await? - .msg) + .response) } /// Get information about the authenticated user diff --git a/cli/src/render.rs b/cli/src/render.rs index 1d6f39266..4544ed1fb 100644 --- a/cli/src/render.rs +++ b/cli/src/render.rs @@ -6,7 +6,6 @@ use phylum_types::types::project::*; use prettytable::*; use crate::print::{self, table_format}; -use crate::types::PingResponse; pub trait Renderable { fn render(&self) -> String; @@ -286,12 +285,6 @@ impl Renderable for CancelJobResponse { } } -impl Renderable for PingResponse { - fn render(&self) -> String { - format!("Ping response: {}", self.msg) - } -} - impl Renderable for ProjectThresholds { fn render(&self) -> String { let normalize = |t: f32| (t * 100.0).round() as u32; diff --git a/cli/src/types.rs b/cli/src/types.rs index dfb73138d..19446338d 100644 --- a/cli/src/types.rs +++ b/cli/src/types.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize)] pub struct PingResponse { - pub msg: String, + pub response: String, } // TODO Deprecate