fix(discover): resolve a typing issue with the WatchlistItem interface (#1156)

This commit is contained in:
Gauthier
2024-12-16 17:03:16 +01:00
committed by GitHub
parent 7daea46eaa
commit de6e591bae
3 changed files with 3 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ export interface GenreSliderItem {
}
export interface WatchlistItem {
id: number;
ratingKey: string;
tmdbId: number;
mediaType: 'movie' | 'tv';

View File

@@ -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',

View File

@@ -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',