diff --git a/api/src/controllers/profiles/history.ts b/api/src/controllers/profiles/history.ts index 68379fde..ec605ea1 100644 --- a/api/src/controllers/profiles/history.ts +++ b/api/src/controllers/profiles/history.ts @@ -206,11 +206,11 @@ export const historyH = new Elysia({ tags: ["profiles"] }) .where( and( eq(nextEntry.showPk, entries.showPk), - ne(entries.kind, "extra"), + ne(nextEntry.kind, "extra"), gt(nextEntry.order, entries.order), ), ) - .orderBy(nextEntry.showPk, entries.order) + .orderBy(nextEntry.order) .limit(1) .as("nextEntryQ"); diff --git a/api/tests/series/nextup.test.ts b/api/tests/series/nextup.test.ts index 01613775..af25062b 100644 --- a/api/tests/series/nextup.test.ts +++ b/api/tests/series/nextup.test.ts @@ -3,10 +3,7 @@ import { addToHistory, createMovie, createSerie, - getEntries, - getHistory, getMovie, - getNews, getNextup, getSerie, getWatchlist,