diff --git a/src/backend/src/api/mod.rs b/src/backend/src/api/mod.rs index 3e2071a..72bd1b3 100644 --- a/src/backend/src/api/mod.rs +++ b/src/backend/src/api/mod.rs @@ -6,5 +6,5 @@ mod types; use mappings::*; use repositories::*; -use services::*; +pub use services::*; pub use types::*; diff --git a/src/backend/src/api/services/mod.rs b/src/backend/src/api/services/mod.rs index 2f9171c..230de75 100644 --- a/src/backend/src/api/services/mod.rs +++ b/src/backend/src/api/services/mod.rs @@ -11,5 +11,5 @@ pub(super) use akash_service::*; pub(super) use config_service::*; pub(super) use deployments_service::*; pub(super) use ledger_service::*; -pub(super) use log_service::*; +pub use log_service::*; pub(super) use users_service::*; diff --git a/src/backend/src/helpers/websocket.rs b/src/backend/src/helpers/websocket.rs index 334a227..0ba47d8 100644 --- a/src/backend/src/helpers/websocket.rs +++ b/src/backend/src/helpers/websocket.rs @@ -1,9 +1,8 @@ -use crate::api::DeploymentUpdateWsMessage; +use crate::api::{log_error, DeploymentUpdateWsMessage}; use ic_websocket_cdk::ClientPrincipal; pub fn send_canister_update(client_principal: ClientPrincipal, update: DeploymentUpdateWsMessage) { - // print(format!("Sending message: {:?}", update)); - if ic_websocket_cdk::send(client_principal, update.candid_serialize()).is_err() { - // print(format!("Could not send message: {}", e)); + if let Err(e) = ic_websocket_cdk::send(client_principal, update.candid_serialize()) { + log_error!(format!("Failed to send ws message: {:?}", e), "websocket") } }