diff --git a/src/models/actions/update/UpdateRunner.ts b/src/models/actions/update/UpdateRunner.ts index 29a2423..d2ba31a 100644 --- a/src/models/actions/update/UpdateRunner.ts +++ b/src/models/actions/update/UpdateRunner.ts @@ -1,4 +1,4 @@ -import { IsInt, IsObject } from 'class-validator'; +import { IsInt, IsPositive } from 'class-validator'; import { getConnectionManager } from 'typeorm'; import { RunnerGroupNotFoundError } from '../../../errors/RunnerGroupErrors'; import { RunnerOrganisationWrongTypeError } from '../../../errors/RunnerOrganisationErrors'; @@ -20,11 +20,11 @@ export class UpdateRunner extends CreateParticipant { id: number; /** - * The updated runner's new team/org. - * Just has to contain the group's id -everything else won't be checked or changed. + * The updated runner's group's id. */ - @IsObject() - group: RunnerGroup; + @IsInt() + @IsPositive() + group: number; /** * Updates a provided Runner entity based on this.