1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-04-22 10:52:10 +00:00

feat: Add firstSet and lastSet properties to Serie interface (#591)

This commit is contained in:
David Leiva 2024-12-01 16:35:26 -06:00 committed by GitHub
parent 48a984ef50
commit 121db30389
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,8 @@ export interface SerieResume {
* /series/:id endpoint
*/
export interface Serie extends SerieResume {
firstSet: SetResume;
lastSet: SetResume;
sets: Array<SetResume>;
}

View File

@ -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
}
}