feat(runners): Allow created via being set via api
This commit is contained in:
parent
599c75fc00
commit
d6755ed134
@ -50,4 +50,11 @@ export abstract class CreateParticipant {
|
|||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsObject()
|
@IsObject()
|
||||||
address?: Address;
|
address?: Address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* how the participant got into the system
|
||||||
|
*/
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
created_via?: string;
|
||||||
}
|
}
|
@ -32,6 +32,9 @@ export class CreateRunner extends CreateParticipant {
|
|||||||
newRunner.email = this.email;
|
newRunner.email = this.email;
|
||||||
newRunner.group = await this.getGroup();
|
newRunner.group = await this.getGroup();
|
||||||
newRunner.address = this.address;
|
newRunner.address = this.address;
|
||||||
|
if (this.created_via) {
|
||||||
|
newRunner.created_via = this.created_via;
|
||||||
|
}
|
||||||
Address.validate(newRunner.address);
|
Address.validate(newRunner.address);
|
||||||
|
|
||||||
return newRunner;
|
return newRunner;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user