Move unshare_project to db module
This commit is contained in:
parent
e5f05c9f3b
commit
94fe93c6ee
3 changed files with 59 additions and 103 deletions
|
@ -877,14 +877,19 @@ impl Server {
|
|||
message: Message<proto::UnshareProject>,
|
||||
) -> Result<()> {
|
||||
let project_id = ProjectId::from_proto(message.payload.project_id);
|
||||
let mut store = self.store().await;
|
||||
let (room, project) = store.unshare_project(project_id, message.sender_connection_id)?;
|
||||
|
||||
let (room, guest_connection_ids) = self
|
||||
.app_state
|
||||
.db
|
||||
.unshare_project(project_id, message.sender_connection_id)
|
||||
.await?;
|
||||
|
||||
broadcast(
|
||||
message.sender_connection_id,
|
||||
project.guest_connection_ids(),
|
||||
guest_connection_ids,
|
||||
|conn_id| self.peer.send(conn_id, message.payload.clone()),
|
||||
);
|
||||
self.room_updated(room);
|
||||
self.room_updated(&room);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue