Skip to content

Commit

Permalink
feat: Add firstSet and lastSet properties to Serie interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dleiva04 committed Nov 29, 2024
1 parent aeaa784 commit 5bb9c46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions meta/definitions/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export interface SerieResume {
* /series/:id endpoint
*/
export interface Serie extends SerieResume {
firstSet: SetResume;
lastSet: SetResume;
sets: Array<SetResume>;
}

Expand Down
2 changes: 2 additions & 0 deletions server/compiler/utils/serieUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 5bb9c46

Please sign in to comment.