Implemented runner selfservice token generation

ref #112
This commit is contained in:
2021-01-21 18:03:48 +01:00
parent 34c852b12a
commit c39a59e54e
3 changed files with 27 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { IsInt, IsString } from "class-validator";
import { IsInt, IsOptional, IsString } from "class-validator";
import { DistanceDonation } from '../entities/DistanceDonation';
import { Runner } from '../entities/Runner';
import { RunnerGroup } from '../entities/RunnerGroup';
@@ -36,6 +36,14 @@ export class ResponseSelfServiceRunner extends ResponseParticipant {
@IsString()
donations: ResponseSelfServiceDonation[]
/**
* The runner's self-service jwt for auth.
* Will only get delivered on registration/via email.
*/
@IsString()
@IsOptional()
token: string;
/**
* Creates a ResponseRunner object from a runner.
* @param runner The user the response shall be build for.