From 4373ca4ba97369f0fa81b1ddc349bb229d3275ae Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 12 Dec 2024 18:52:25 -0800 Subject: [PATCH] validation: print payload --- validation/src/publish_fix.rs | 2 +- validation/src/publish_new.rs | 2 +- validation/src/validator.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/validation/src/publish_fix.rs b/validation/src/publish_fix.rs index 586021a..ab82cd8 100644 --- a/validation/src/publish_fix.rs +++ b/validation/src/publish_fix.rs @@ -30,7 +30,7 @@ impl Publisher{ } } pub async fn publish(&self,message:async_nats::jetstream::Message)->Result<(),PublishError>{ - println!("publish_fix {:?}",message); + println!("publish_fix {:?}",message.message.payload); // decode json let publish_info:PublishFixRequest=serde_json::from_slice(&message.payload).map_err(PublishError::Json)?; diff --git a/validation/src/publish_new.rs b/validation/src/publish_new.rs index 4da6e1c..6778aad 100644 --- a/validation/src/publish_new.rs +++ b/validation/src/publish_new.rs @@ -35,7 +35,7 @@ impl Publisher{ } } pub async fn publish(&self,message:async_nats::jetstream::Message)->Result<(),PublishError>{ - println!("publish_new {:?}",message); + println!("publish_new {:?}",message.message.payload); // decode json let publish_info:PublishNewRequest=serde_json::from_slice(&message.payload).map_err(PublishError::Json)?; diff --git a/validation/src/validator.rs b/validation/src/validator.rs index 61c277a..f0c3c37 100644 --- a/validation/src/validator.rs +++ b/validation/src/validator.rs @@ -50,7 +50,7 @@ impl Validator{ } } pub async fn validate(&self,message:async_nats::jetstream::Message)->Result<(),ValidateError>{ - println!("validate {:?}",message); + println!("validate {:?}",message.message.payload); // decode json let validate_info:ValidateRequest=serde_json::from_slice(&message.payload).map_err(ValidateError::Json)?;