Skip to content

Commit c2f66de

Browse files
committed
chore: add UUID back to vmdomain to fix connect
1 parent d3d5e70 commit c2f66de

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

api/src/unraid-api/graph/resolvers/vms/vms.model.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Field, InputType, ObjectType, registerEnumType } from '@nestjs/graphql';
22

3-
import { IsNotEmpty, IsString } from 'class-validator';
3+
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
44

55
import { Node } from '@app/unraid-api/graph/resolvers/base.model.js';
66
import { PrefixedID } from '@app/unraid-api/graph/scalars/graphql-type-prefixed-id.js';
@@ -30,10 +30,19 @@ export class VmDomain implements Node {
3030
id!: string;
3131

3232
@Field({ nullable: true, description: 'A friendly name for the vm' })
33+
@IsString()
3334
name?: string;
3435

3536
@Field(() => VmState, { description: 'Current domain vm state' })
37+
@IsEnum(VmState)
3638
state!: VmState;
39+
40+
@Field(() => String, {
41+
nullable: true,
42+
description: 'The UUID of the vm',
43+
deprecationReason: 'Use id instead',
44+
})
45+
uuid?: string;
3746
}
3847

3948
@ObjectType({ implements: () => Node })

api/src/unraid-api/graph/resolvers/vms/vms.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ export class VmsService implements OnModuleInit, OnModuleDestroy {
361361

362362
return {
363363
id: uuid,
364+
uuid,
364365
name,
365366
state,
366367
};

0 commit comments

Comments
 (0)