mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
All tests passing
This commit is contained in:
7 files changed
+138
-96
No files matched your search
@@ -53,6 +53,10 @@ 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,6 +87,10 @@ 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 {
|
||||
@@ -298,6 +302,10 @@ 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 {
|
||||
|
||||
@@ -259,6 +259,10 @@ 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 {
|
||||
@@ -279,4 +283,8 @@ export class ModUpdateEvent {
|
||||
static fromJSON(json: Static<typeof this.jsonSchema>) {
|
||||
return new this(ModInfo.fromJSON(json.mod));
|
||||
}
|
||||
|
||||
get subscriptionChannel() {
|
||||
return this.mod.name;
|
||||
}
|
||||
}
|
||||
@@ -451,4 +451,8 @@ export class UserUpdateEvent {
|
||||
static fromJSON(json: Static<typeof this.jsonSchema>) {
|
||||
return new this(RawUser.fromJSON(json.user));
|
||||
}
|
||||
|
||||
get subscriptionChannel() {
|
||||
return this.user.name;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user