validation: print payload

This commit is contained in:
Quaternions 2024-12-12 18:52:25 -08:00
parent f77dd14ac9
commit 4373ca4ba9
3 changed files with 3 additions and 3 deletions

View File

@ -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)?;

View File

@ -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)?;

View File

@ -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)?;