Remove channels to simplify subscription

Make subscriptions either on or off to greatly simplify the logic of
subscribing to events.
This commit is contained in:
Hornwitser committed 2023-12-03 20:32:48 +01:00
1 parent a2eb98ac93
commit 58914042cc
11 files changed
+51 -279

No files matched your search

-4
View File
@@ -63,10 +63,6 @@ export class HostUpdateEvent {
static fromJSON(json: Static<typeof this.jsonSchema>) {
return new this(HostDetails.fromJSON(json.update));
}
get subscriptionChannel() {
return this.update.id;
}
}
export class HostMetricsRequest {
@@ -87,10 +87,6 @@ export class InstanceDetailsUpdateEvent {
static fromJSON(json: Static<typeof this.jsonSchema>) {
return new this(InstanceDetails.fromJSON(json));
}
get subscriptionChannel() {
return this.details.id;
}
};
export class InstanceCreateRequest {
@@ -302,10 +298,6 @@ export class InstanceSaveListUpdateEvent {
static fromJSON(json: Static<typeof this.jsonSchema>) {
return new this(json.instanceId, json.saves.map(i => SaveDetails.fromJSON(i)));
}
get subscriptionChannel() {
return this.instanceId;
}
}
export class InstanceCreateSaveRequest {
-8
View File
@@ -263,10 +263,6 @@ export class ModPackUpdateEvent {
static fromJSON(json: Static<typeof this.jsonSchema>) {
return new this(ModPack.fromJSON(json.modPack));
}
get subscriptionChannel() {
return this.modPack.id;
}
}
export class ModUpdateEvent {
@@ -287,8 +283,4 @@ export class ModUpdateEvent {
static fromJSON(json: Static<typeof this.jsonSchema>) {
return new this(ModInfo.fromJSON(json.mod));
}
get subscriptionChannel() {
return this.mod.name;
}
}
-4
View File
@@ -319,8 +319,4 @@ export class UserUpdateEvent {
static fromJSON(json: Static<typeof this.jsonSchema>) {
return new this(User.fromJSON(json.user));
}
get subscriptionChannel() {
return this.user.name;
}
}