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">
|
||||
<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 {
|
||||
|
|
|
@ -2,5 +2,6 @@ export type MovieList = {
|
|||
id: number;
|
||||
name: string;
|
||||
public: boolean;
|
||||
owner: number;
|
||||
movie_count: number;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue