From 5bb9c4634935b868822d961487ff8a91b585690b Mon Sep 17 00:00:00 2001 From: David Leiva Date: Thu, 28 Nov 2024 22:28:10 -0600 Subject: [PATCH] feat: Add firstSet and lastSet properties to Serie interface --- meta/definitions/api.d.ts | 2 ++ server/compiler/utils/serieUtil.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/meta/definitions/api.d.ts b/meta/definitions/api.d.ts index a484e20f58..c3831a0e9e 100644 --- a/meta/definitions/api.d.ts +++ b/meta/definitions/api.d.ts @@ -15,6 +15,8 @@ export interface SerieResume { * /series/:id endpoint */ export interface Serie extends SerieResume { + firstSet: SetResume; + lastSet: SetResume; sets: Array; } diff --git a/server/compiler/utils/serieUtil.ts b/server/compiler/utils/serieUtil.ts index 07fc0a2127..f298abc04d 100644 --- a/server/compiler/utils/serieUtil.ts +++ b/server/compiler/utils/serieUtil.ts @@ -63,6 +63,8 @@ export async function serieToSerieSingle(serie: Serie, lang: SupportedLanguages) id: serie.id, logo, name: serie.name[lang] as string, + firstSet: sets[0], + lastSet: sets[sets.length - 1], sets } }