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

@@ -100,18 +100,6 @@ export default abstract class BaseStore<T extends BaseModel> {
return item;
};
@action
patch = (item: PartialWithId<T> | T): T | undefined => {
const existingModel = this.data.get(item.id);
if (existingModel) {
existingModel.updateFromJson(item);
return existingModel;
}
return;
};
@action
remove(id: string): void {
this.data.delete(id);