diff --git a/src/controllers/StatsController.ts b/src/controllers/StatsController.ts index 694815f..eb359ce 100644 --- a/src/controllers/StatsController.ts +++ b/src/controllers/StatsController.ts @@ -157,7 +157,7 @@ export class StatsController { @ResponseSchema(ResponseStatsOrgnisation, { isArray: true }) @OpenAPI({ description: "Returns the top ten organizations by donations.", security: [{ "StatsApiToken": [] }, { "AuthToken": [] }, { "RefreshTokenCookie": [] }] }) async getTopOrgsByDonations() { - let orgs = await getConnection().getRepository(RunnerOrganization).find({ relations: ['runners', 'runners.scans', 'runners.distanceDonations', 'runners.scans.track', 'teams', 'teams.runners', 'teams.runners.scans', 'teams.runners.distanceDonations', 'teams.runners.scans.track'] }); + let orgs = await getConnection().getRepository(RunnerOrganization).find({ relations: ['runners', 'runners.distanceDonations', 'runners.distanceDonations.runner', 'runners.distanceDonations.runner.scans', 'runners.distanceDonations.runner.scans.track', 'teams', 'teams.runners', 'teams.runners.distanceDonations', 'teams.runners.distanceDonations.runner', 'teams.runners.distanceDonations.runner.scans', 'teams.runners.distanceDonations.runner.scans.track'] }); if (!orgs || orgs.length == 0) { return []; }