From 1382699dda07f4a2eb0de9a83d95191892027473 Mon Sep 17 00:00:00 2001 From: "Edward Tirado Jr." Date: Thu, 29 May 2025 13:55:55 -0500 Subject: [PATCH] fixed hide schedule bug --- src/nuxt.config.ts | 2 +- src/pages/lists/[id].vue | 4 ++-- src/types/movie.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nuxt.config.ts b/src/nuxt.config.ts index 4619992..17d32de 100644 --- a/src/nuxt.config.ts +++ b/src/nuxt.config.ts @@ -24,7 +24,7 @@ export default defineNuxtConfig({ runtimeConfig: { public: { - apiURL: process.env.API_URL || "http://localhost:8000/api", + apiURL: process.env.API_URL || "http://localhost:8000/v1", }, }, diff --git a/src/pages/lists/[id].vue b/src/pages/lists/[id].vue index 4408eaa..5eb525a 100644 --- a/src/pages/lists/[id].vue +++ b/src/pages/lists/[id].vue @@ -120,9 +120,9 @@ const getList = async function (list_id: number) { }; const hideScheduled = function () { - if (hide_scheduled && movies.value.length > 0) { + if (hide_scheduled.value && movies.value.length > 0) { let filtered = movies.value.filter((movie) => { - return movie.last_watched === null; + return !movie.has_been_scheduled; }); if (typeof filtered != "undefined") { filtered_movies.value = filtered; diff --git a/src/types/movie.ts b/src/types/movie.ts index f8cfed0..39e67bc 100644 --- a/src/types/movie.ts +++ b/src/types/movie.ts @@ -10,5 +10,5 @@ export type Movie = { actors: string; plot: string; poster: string; - last_watched: string; + has_been_scheduled: boolean; };