merge dev to main #208

Merged
philipp merged 79 commits from dev into main 2023-11-06 17:18:50 +00:00
2 changed files with 4 additions and 1 deletions
Showing only changes of commit 8d9418635d - Show all commits

View File

@ -52,7 +52,7 @@ export class RunnerOrganizationController {
@OnUndefined(RunnerOrganizationNotFoundError) @OnUndefined(RunnerOrganizationNotFoundError)
@OpenAPI({ description: 'Lists all information about the organization whose id got provided.' }) @OpenAPI({ description: 'Lists all information about the organization whose id got provided.' })
async getOne(@Param('id') id: number) { async getOne(@Param('id') id: number) {
let runnerOrg = await this.runnerOrganizationRepository.findOne({ id: id }, { relations: ['contact', 'teams', 'runners', 'runners.scans', 'runners.scans.track'] }); let runnerOrg = await this.runnerOrganizationRepository.findOne({ id: id }, { relations: ['contact', 'teams', 'teams.runners', 'teams.runners.scans', 'teams.runners.scans.track', 'runners', 'runners.scans', 'runners.scans.track'] });
if (!runnerOrg) { throw new RunnerOrganizationNotFoundError(); } if (!runnerOrg) { throw new RunnerOrganizationNotFoundError(); }
return new ResponseRunnerOrganization(runnerOrg); return new ResponseRunnerOrganization(runnerOrg);
} }

View File

@ -67,6 +67,9 @@ export class ResponseRunnerOrganization extends ResponseRunnerGroup implements I
for (let team of org.teams) { for (let team of org.teams) {
this.teams.push(team.toResponse()); this.teams.push(team.toResponse());
} }
for (const team of this.teams) {
this.total_distance += team.total_distance;
}
} }
if (!org.key) { this.registrationEnabled = false; } if (!org.key) { this.registrationEnabled = false; }