Compare commits
No commits in common. "fcccf82d480e2e85d5c7b0e1faffda9038731d8c" and "4008a5ee720b212bac9cba64417058bf4526060b" have entirely different histories.
fcccf82d48
...
4008a5ee72
@ -132,7 +132,7 @@ export class RunnerController {
|
||||
async remove(@Param("id") id: number, @QueryParam("force") force: boolean) {
|
||||
let runner = await this.runnerRepository.findOne({ id: id });
|
||||
if (!runner) { return null; }
|
||||
const responseRunner = await this.runnerRepository.findOne(runner);
|
||||
const responseRunner = await this.runnerRepository.findOne(runner, { relations: ['scans', 'group', 'group.parentGroup', 'scans.track', 'cards'] });
|
||||
|
||||
if (!runner) {
|
||||
throw new RunnerNotFoundError();
|
||||
|
@ -119,7 +119,7 @@ export class RunnerTeamController {
|
||||
async remove(@Param("id") id: number, @QueryParam("force") force: boolean) {
|
||||
let team = await this.runnerTeamRepository.findOne({ id: id });
|
||||
if (!team) { return null; }
|
||||
let runnerTeam = await this.runnerTeamRepository.findOne(team, { relations: ['runners'] });
|
||||
let runnerTeam = await this.runnerTeamRepository.findOne(team, { relations: ['parentGroup', 'contact', 'runners'] });
|
||||
|
||||
if (!force) {
|
||||
if (runnerTeam.runners.length != 0) {
|
||||
|
@ -26,7 +26,6 @@ export class CreateSelfServiceCitizenRunner extends CreateParticipant {
|
||||
public async toEntity(): Promise<Runner> {
|
||||
let newRunner: Runner = new Runner();
|
||||
|
||||
newRunner.created_via = "selfservice";
|
||||
newRunner.firstname = this.firstname;
|
||||
newRunner.middlename = this.middlename;
|
||||
newRunner.lastname = this.lastname;
|
||||
|
@ -28,7 +28,6 @@ export class CreateSelfServiceRunner extends CreateParticipant {
|
||||
public async toEntity(group: RunnerGroup): Promise<Runner> {
|
||||
let newRunner: Runner = new Runner();
|
||||
|
||||
newRunner.created_via = "selfservice";
|
||||
newRunner.firstname = this.firstname;
|
||||
newRunner.middlename = this.middlename;
|
||||
newRunner.lastname = this.lastname;
|
||||
|
@ -75,14 +75,6 @@ export abstract class Participant {
|
||||
@IsEmail()
|
||||
email?: string;
|
||||
|
||||
/**
|
||||
* how the participant got into the system
|
||||
*/
|
||||
@Column({ nullable: true })
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
created_via?: string;
|
||||
|
||||
/**
|
||||
* Turns this entity into it's response class.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user