From de6e591baedacb33704216842dddaa2b96bfae19 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Mon, 16 Dec 2024 17:03:16 +0100 Subject: [PATCH] fix(discover): resolve a typing issue with the WatchlistItem interface (#1156) --- server/interfaces/api/discoverInterfaces.ts | 1 + server/routes/discover.ts | 1 + server/routes/user/index.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/server/interfaces/api/discoverInterfaces.ts b/server/interfaces/api/discoverInterfaces.ts index 89cb7426f..6738cbb5f 100644 --- a/server/interfaces/api/discoverInterfaces.ts +++ b/server/interfaces/api/discoverInterfaces.ts @@ -5,6 +5,7 @@ export interface GenreSliderItem { } export interface WatchlistItem { + id: number; ratingKey: string; tmdbId: number; mediaType: 'movie' | 'tv'; diff --git a/server/routes/discover.ts b/server/routes/discover.ts index 05947cd03..4bb12740d 100644 --- a/server/routes/discover.ts +++ b/server/routes/discover.ts @@ -875,6 +875,7 @@ discoverRoutes.get, 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', diff --git a/server/routes/user/index.ts b/server/routes/user/index.ts index 372218e7f..7a63853fb 100644 --- a/server/routes/user/index.ts +++ b/server/routes/user/index.ts @@ -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',