Switched to accepting ids (numbers/number arrays) feature/90-accept_objects #101

Merged
niggl merged 26 commits from feature/90-accept_objects into dev 2021-01-15 17:57:47 +00:00
Showing only changes of commit e96637219f - Show all commits

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.