parent
cf583a22fa
commit
24de82f6df
@ -82,7 +82,7 @@ export class RunnerTeamController {
|
|||||||
throw new RunnerTeamIdsNotMatchingError();
|
throw new RunnerTeamIdsNotMatchingError();
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.runnerTeamRepository.update(oldRunnerTeam, await runnerTeam.toRunnerTeam());
|
await this.runnerTeamRepository.save(await runnerTeam.updateRunnerTeam(oldRunnerTeam));
|
||||||
|
|
||||||
return new ResponseRunnerTeam(await this.runnerTeamRepository.findOne({ id: runnerTeam.id }, { relations: ['parentGroup', 'contact'] }));
|
return new ResponseRunnerTeam(await this.runnerTeamRepository.findOne({ id: runnerTeam.id }, { relations: ['parentGroup', 'contact'] }));
|
||||||
}
|
}
|
||||||
|
@ -37,14 +37,12 @@ export class UpdateRunnerTeam extends CreateRunnerGroup {
|
|||||||
/**
|
/**
|
||||||
* Creates a RunnerTeam entity from this.
|
* Creates a RunnerTeam entity from this.
|
||||||
*/
|
*/
|
||||||
public async toRunnerTeam(): Promise<RunnerTeam> {
|
public async updateRunnerTeam(team: RunnerTeam): Promise<RunnerTeam> {
|
||||||
let newRunnerTeam: RunnerTeam = new RunnerTeam();
|
|
||||||
|
|
||||||
newRunnerTeam.id = this.id;
|
team.name = this.name;
|
||||||
newRunnerTeam.name = this.name;
|
team.parentGroup = await this.getParent();
|
||||||
newRunnerTeam.parentGroup = await this.getParent();
|
team.contact = await this.getContact()
|
||||||
newRunnerTeam.contact = await this.getContact()
|
|
||||||
|
|
||||||
return newRunnerTeam;
|
return team;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user