added movie count to lists index

This commit is contained in:
Edward Tirado Jr 2025-04-07 00:44:51 -05:00
parent 21ad4d3da3
commit ffa8706ed1
2 changed files with 4 additions and 3 deletions

View file

@ -9,7 +9,7 @@
<NuxtLink :to="`/lists/${list.id}`" class="underline">
<h2 class="text-lg">{{ list.name }}</h2>
</NuxtLink>
<span>Movies: {{ list.movie_count }}</span>
<span>Movies: {{ list.movie_count || 0 }}</span>
</div>
</li>
</ul>
@ -33,8 +33,8 @@ const updateLists = async function () {
},
);
if (error) {
if (error.value?.statusCode === 401) {
if (error.value) {
if (error.value.statusCode === 401) {
navigateTo("/");
}
} else {

View file

@ -2,5 +2,6 @@ export type MovieList = {
id: number;
name: string;
public: boolean;
owner: number;
movie_count: number;
};