feat(runners): Allow created via being set via api

This commit is contained in:
Nicolai Ort 2025-04-08 21:04:38 +02:00
parent 599c75fc00
commit d6755ed134
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
2 changed files with 10 additions and 0 deletions

View File

@ -50,4 +50,11 @@ export abstract class CreateParticipant {
@IsOptional()
@IsObject()
address?: Address;
/**
* how the participant got into the system
*/
@IsOptional()
@IsString()
created_via?: string;
}

View File

@ -32,6 +32,9 @@ export class CreateRunner extends CreateParticipant {
newRunner.email = this.email;
newRunner.group = await this.getGroup();
newRunner.address = this.address;
if (this.created_via) {
newRunner.created_via = this.created_via;
}
Address.validate(newRunner.address);
return newRunner;