event is added
This commit is contained in:
parent
8987d2b8e5
commit
dde35b227c
|
@ -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(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user