added movie count to lists index
This commit is contained in:
parent
21ad4d3da3
commit
ffa8706ed1
2 changed files with 4 additions and 3 deletions
|
@ -9,7 +9,7 @@
|
||||||
<NuxtLink :to="`/lists/${list.id}`" class="underline">
|
<NuxtLink :to="`/lists/${list.id}`" class="underline">
|
||||||
<h2 class="text-lg">{{ list.name }}</h2>
|
<h2 class="text-lg">{{ list.name }}</h2>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<span>Movies: {{ list.movie_count }}</span>
|
<span>Movies: {{ list.movie_count || 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -33,8 +33,8 @@ const updateLists = async function () {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (error) {
|
if (error.value) {
|
||||||
if (error.value?.statusCode === 401) {
|
if (error.value.statusCode === 401) {
|
||||||
navigateTo("/");
|
navigateTo("/");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,5 +2,6 @@ export type MovieList = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
public: boolean;
|
public: boolean;
|
||||||
|
owner: number;
|
||||||
movie_count: number;
|
movie_count: number;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue