Merge alpha 0.0.5 to master #54

Merged
niggl merged 292 commits from dev into main 2020-12-23 17:05:35 +00:00
2 changed files with 6 additions and 8 deletions
Showing only changes of commit 24de82f6df - Show all commits

View File

@ -82,7 +82,7 @@ export class RunnerTeamController {
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'] }));
}

View File

@ -37,14 +37,12 @@ export class UpdateRunnerTeam extends CreateRunnerGroup {
/**
* Creates a RunnerTeam entity from this.
*/
public async toRunnerTeam(): Promise<RunnerTeam> {
let newRunnerTeam: RunnerTeam = new RunnerTeam();
public async updateRunnerTeam(team: RunnerTeam): Promise<RunnerTeam> {
newRunnerTeam.id = this.id;
newRunnerTeam.name = this.name;
newRunnerTeam.parentGroup = await this.getParent();
newRunnerTeam.contact = await this.getContact()
team.name = this.name;
team.parentGroup = await this.getParent();
team.contact = await this.getContact()
return newRunnerTeam;
return team;
}
}