Refactoring: switched update runner group from objects to ids

ref #90
This commit is contained in:
Nicolai Ort 2021-01-15 18:29:30 +01:00
parent 17244b0006
commit e96637219f
1 changed files with 5 additions and 5 deletions

View File

@ -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.