Skip to content

Commit

Permalink
fix(discover): resolve a typing issue with the WatchlistItem interface (
Browse files Browse the repository at this point in the history
  • Loading branch information
gauthier-th authored Dec 16, 2024
1 parent 7daea46 commit de6e591
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/interfaces/api/discoverInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface GenreSliderItem {
}

export interface WatchlistItem {
id: number;
ratingKey: string;
tmdbId: number;
mediaType: 'movie' | 'tv';
Expand Down
1 change: 1 addition & 0 deletions server/routes/discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ discoverRoutes.get<Record<string, unknown>, WatchlistResponse>(
totalPages: Math.ceil(watchlist.totalSize / itemsPerPage),
totalResults: watchlist.totalSize,
results: watchlist.items.map((item) => ({
id: item.tmdbId,
ratingKey: item.ratingKey,
title: item.title,
mediaType: item.type === 'show' ? 'tv' : 'movie',
Expand Down
1 change: 1 addition & 0 deletions server/routes/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ router.get<{ id: string }, WatchlistResponse>(
totalPages: Math.ceil(watchlist.totalSize / itemsPerPage),
totalResults: watchlist.totalSize,
results: watchlist.items.map((item) => ({
id: item.tmdbId,
ratingKey: item.ratingKey,
title: item.title,
mediaType: item.type === 'show' ? 'tv' : 'movie',
Expand Down

0 comments on commit de6e591

Please # to comment.