@@ -7,6 +7,7 @@ import { InvalidCredentialsError } from '../errors/AuthError';
|
||||
import { RunnerEmailNeededError, RunnerNotFoundError } from '../errors/RunnerErrors';
|
||||
import { RunnerGroupNotFoundError } from '../errors/RunnerGroupErrors';
|
||||
import { RunnerOrganisationNotFoundError } from '../errors/RunnerOrganisationErrors';
|
||||
import { JwtCreator } from '../jwtcreator';
|
||||
import { CreateSelfServiceCitizenRunner } from '../models/actions/create/CreateSelfServiceCitizenRunner';
|
||||
import { CreateSelfServiceRunner } from '../models/actions/create/CreateSelfServiceRunner';
|
||||
import { Runner } from '../models/entities/Runner';
|
||||
@@ -58,7 +59,9 @@ export class RunnerSelfServiceController {
|
||||
let runner = await createRunner.toEntity(org);
|
||||
runner = await this.runnerRepository.save(runner);
|
||||
|
||||
return new ResponseSelfServiceRunner(await this.runnerRepository.findOne(runner, { relations: ['scans', 'group', 'scans.track', 'cards', 'distanceDonations', 'distanceDonations.donor', 'distanceDonations.runner', 'distanceDonations.runner.scans', 'distanceDonations.runner.scans.track'] }));
|
||||
let response = new ResponseSelfServiceRunner(await this.runnerRepository.findOne(runner, { relations: ['scans', 'group', 'scans.track', 'cards', 'distanceDonations', 'distanceDonations.donor', 'distanceDonations.runner', 'distanceDonations.runner.scans', 'distanceDonations.runner.scans.track'] }));
|
||||
response.token = JwtCreator.createSelfService(runner);
|
||||
return response
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user