fix: Wrap websocket handlers in action

Separate documents.archive
This commit is contained in:
Tom Moor
2022-08-25 10:56:47 +02:00
parent d2aea687f3
commit debadcb711
3 changed files with 102 additions and 122 deletions

View File

@@ -28,7 +28,6 @@ export default class WebsocketsProcessor {
switch (event.name) {
case "documents.publish":
case "documents.restore":
case "documents.archive":
case "documents.unarchive": {
const document = await Document.findByPk(event.documentId, {
paranoid: false,
@@ -84,6 +83,7 @@ export default class WebsocketsProcessor {
});
}
case "documents.archive":
case "documents.update": {
const document = await Document.findByPk(event.documentId, {
paranoid: false,