Remove collection fetch on document delete

This commit is contained in:
Tom Moor
2022-08-25 10:43:05 +02:00
parent 60309975e0
commit d2aea687f3
6 changed files with 53 additions and 22 deletions

View File

@@ -64,7 +64,7 @@ export default class WebsocketsProcessor {
return;
}
socketio
return socketio
.to(
document.publishedAt
? `collection-${document.collectionId}`
@@ -72,17 +72,7 @@ export default class WebsocketsProcessor {
)
.emit(event.name, {
modelId: event.documentId,
});
return socketio
.to(`collection-${document.collectionId}`)
.emit("entities", {
event: event.name,
collectionIds: [
{
id: document.collectionId,
},
],
collectionId: event.collectionId,
});
}