fix(discover): resolve a typing issue with the WatchlistItem interface (#1156)
This commit is contained in:
@@ -5,6 +5,7 @@ export interface GenreSliderItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface WatchlistItem {
|
export interface WatchlistItem {
|
||||||
|
id: number;
|
||||||
ratingKey: string;
|
ratingKey: string;
|
||||||
tmdbId: number;
|
tmdbId: number;
|
||||||
mediaType: 'movie' | 'tv';
|
mediaType: 'movie' | 'tv';
|
||||||
|
|||||||
@@ -875,6 +875,7 @@ discoverRoutes.get<Record<string, unknown>, WatchlistResponse>(
|
|||||||
totalPages: Math.ceil(watchlist.totalSize / itemsPerPage),
|
totalPages: Math.ceil(watchlist.totalSize / itemsPerPage),
|
||||||
totalResults: watchlist.totalSize,
|
totalResults: watchlist.totalSize,
|
||||||
results: watchlist.items.map((item) => ({
|
results: watchlist.items.map((item) => ({
|
||||||
|
id: item.tmdbId,
|
||||||
ratingKey: item.ratingKey,
|
ratingKey: item.ratingKey,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
mediaType: item.type === 'show' ? 'tv' : 'movie',
|
mediaType: item.type === 'show' ? 'tv' : 'movie',
|
||||||
|
|||||||
@@ -764,6 +764,7 @@ router.get<{ id: string }, WatchlistResponse>(
|
|||||||
totalPages: Math.ceil(watchlist.totalSize / itemsPerPage),
|
totalPages: Math.ceil(watchlist.totalSize / itemsPerPage),
|
||||||
totalResults: watchlist.totalSize,
|
totalResults: watchlist.totalSize,
|
||||||
results: watchlist.items.map((item) => ({
|
results: watchlist.items.map((item) => ({
|
||||||
|
id: item.tmdbId,
|
||||||
ratingKey: item.ratingKey,
|
ratingKey: item.ratingKey,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
mediaType: item.type === 'show' ? 'tv' : 'movie',
|
mediaType: item.type === 'show' ? 'tv' : 'movie',
|
||||||
|
|||||||
Reference in New Issue
Block a user