event is added

This commit is contained in:
병준 박 2022-08-19 00:16:58 +00:00
parent 8987d2b8e5
commit dde35b227c

View File

@ -397,7 +397,28 @@ impl Service<'_> {
bpr::ss::member::CreateMemberResponse { bpr::ss::member::CreateMemberResponse {
error: None, error: None,
result: Some(bpr::ss::member::create_member_response::Result { result: Some(bpr::ss::member::create_member_response::Result {
member: member.map(|d| bpr::models::member::MemberModel::from(&d)), member: member.as_ref().map(bpr::models::member::MemberModel::from),
}),
}
.encode_to_vec(),
)
.await
.map_err(|e| {
bcr::error::rpc::Error::Server(bcr::error::rpc::Server {
code: bpr::protobuf::rpc::Error::SERVER_00,
message: format!("server {}", e),
data: None,
})
})?;
self
.connection_broker
.publish(
bpr::ss::member::EVENT_SUBJECT_AFTER_CREATE_MEMBER,
bpr::ss::member::AfterCreateMemberEvent {
client: Some(client),
event: Some(bpr::ss::member::after_create_member_event::Event {
member: member.as_ref().map(bpr::models::member::MemberModel::from),
}), }),
} }
.encode_to_vec(), .encode_to_vec(),