New model updates for series, collections, authors routes

This commit is contained in:
advplyr 2022-03-12 18:50:31 -06:00
parent 73257188f6
commit 2d19208340
19 changed files with 432 additions and 247 deletions

View file

@ -7,7 +7,7 @@
<div id="bookshelf" class="w-full h-full p-8 overflow-y-auto">
<div class="flex flex-wrap justify-center">
<template v-for="author in authors">
<nuxt-link :key="author.name" :to="`/library/${currentLibraryId}/bookshelf?filter=authors.${$encode(author.name)}`">
<nuxt-link :key="author.id" :to="`/library/${currentLibraryId}/bookshelf?filter=authors.${$encode(author.id)}`">
<cards-author-card :author="author" :width="160" :height="160" class="p-3" />
</nuxt-link>
</template>

View file

@ -18,9 +18,16 @@ export default {
if (!library) {
return redirect('/oops?message=Library not found')
}
var series = await app.$axios.$get(`/api/series/${params.id}`).catch((error) => {
console.error('Failed', error)
return false
})
if (!series) {
return redirect('/oops?message=Series not found')
}
return {
series: app.$decode(params.id),
series: series.name,
seriesId: params.id
}
},