From aab48aae245fa45ff426d4a3c5c25853efc75480 Mon Sep 17 00:00:00 2001 From: Niklas Marion Date: Mon, 5 Aug 2024 10:29:34 +0200 Subject: [PATCH] add country --- src/records/record.entity.ts | 2 ++ src/records/records.service.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/records/record.entity.ts b/src/records/record.entity.ts index 54056f5..783131f 100644 --- a/src/records/record.entity.ts +++ b/src/records/record.entity.ts @@ -30,6 +30,8 @@ export class Record { wind: number | null; @ApiProperty() indoor: boolean; + @ApiProperty() + country: string; @ApiProperty({ type: RecordAthlete, isArray: true }) athletes: RecordAthlete[]; } diff --git a/src/records/records.service.ts b/src/records/records.service.ts index 82f2c5a..520035f 100644 --- a/src/records/records.service.ts +++ b/src/records/records.service.ts @@ -79,6 +79,7 @@ export class RecordsService { mark: result.performance, wind: result.wind, indoor: result.setIndoor, + country: result.country, athletes: athletes.map((competitor) => ({ firstname: competitor.name.split(' ')[0], lastname: formatLastname(competitor.name.split(' ')[1]),