chore: Bringing across edits from enterprise codebase

This commit is contained in:
Tom Moor
2022-04-16 19:46:01 -07:00
parent 0b5e48621a
commit b1aba32b62
7 changed files with 13 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
import { Event } from "@server/types";
export default abstract class BaseProcessor {
static applicableEvents: Event["name"][] = [];
static applicableEvents: (Event["name"] | "*")[] = [];
public abstract perform(event: Event): Promise<void>;
}

View File

@@ -294,7 +294,7 @@ export default class WebsocketsProcessor {
}
case "collections.add_group": {
const group = await Group.findByPk(event.data.groupId);
const group = await Group.findByPk(event.modelId);
if (!group) {
return;
}
@@ -320,7 +320,7 @@ export default class WebsocketsProcessor {
}
case "collections.remove_group": {
const group = await Group.findByPk(event.data.groupId);
const group = await Group.findByPk(event.modelId);
if (!group) {
return;
}