Skip to content

Commit fea1795

Browse files
committed
Simplify InstanceSession model. Update api call to create thumbnails.
1 parent f9d0a09 commit fea1795

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/app/core/graphql/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export type InstanceSession = {
213213
__typename?: 'InstanceSession';
214214
id: Scalars['Int'];
215215
connectionId: Scalars['String'];
216-
instance: Instance;
216+
instanceId: Scalars['Int'];
217217
current: Scalars['Boolean'];
218218
};
219219

src/app/core/models/instanceSession.model.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ export class InstanceSession {
1010
@JsonProperty('connectionId', String)
1111
private _connectionId: string = undefined;
1212

13-
@JsonProperty('instance', Instance)
14-
private _instance: Instance = undefined;
13+
@JsonProperty('instanceId', Number)
14+
private _instanceId: number = undefined;
1515

1616
@JsonProperty('current', Boolean)
1717
private _current: boolean = undefined;
1818

1919
public copy(data: InstanceSession): InstanceSession {
2020
this.id = data.id;
2121
this.connectionId = data.connectionId;
22-
this.instance = data.instance;
22+
this.instanceId = data.instanceId;
2323
this.current = data.current;
2424
return this;
2525
}
@@ -40,12 +40,12 @@ export class InstanceSession {
4040
this._connectionId = value;
4141
}
4242

43-
public get instance(): Instance {
44-
return this._instance;
43+
public get instanceId(): number {
44+
return this._instanceId;
4545
}
4646

47-
public set instance(value: Instance) {
48-
this._instance = value;
47+
public set instanceId(value: number) {
48+
this._instanceId = value;
4949
}
5050

5151
public get current(): boolean {

src/app/core/services/account.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ export class AccountService {
379379
const baseUrl = environment.paths.api;
380380
const formData = new FormData();
381381
formData.append('file', thumbnail);
382-
const url = `${baseUrl}/account/instances/${instance.id}/thumbnail`;
382+
const url = `${baseUrl}/account/instances/${instance.uid}/thumbnail`;
383383
return this.http.post<FormData>(url, formData)
384384
.pipe(map((res) => true));
385385
}

0 commit comments

Comments
 (0)