validation: print payload
This commit is contained in:
parent
f77dd14ac9
commit
4373ca4ba9
@ -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)?;
|
||||
|
||||
|
@ -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)?;
|
||||
|
||||
|
@ -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)?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user