mirror of
https://github.com/gotson/komga.git
synced 2026-05-07 20:15:47 +02:00
use authors/names API which deduplicates
This commit is contained in:
parent
8a687ff14e
commit
2482becc5f
1 changed files with 4 additions and 6 deletions
|
|
@ -58,7 +58,7 @@ const { data: infiniteData, loadNextPage } = useInfiniteQuery({
|
|||
initialPageParam: new PageRequest(0, 50),
|
||||
query: ({ pageParam }) =>
|
||||
komgaClient
|
||||
.GET('/api/v2/authors', {
|
||||
.GET('/api/v2/authors/names', {
|
||||
params: {
|
||||
query: {
|
||||
...apiQuery,
|
||||
|
|
@ -72,11 +72,9 @@ const { data: infiniteData, loadNextPage } = useInfiniteQuery({
|
|||
!lastPage?.last ? new PageRequest((lastPage?.number ?? 0) + 1, lastPage?.size) : null,
|
||||
})
|
||||
const infiniteItems = computed(() => {
|
||||
const itemTypes = Array.from(
|
||||
new Set(
|
||||
infiniteData.value?.pages.flatMap((it) => it?.content?.map((it) => it.name) ?? []) ?? [],
|
||||
),
|
||||
).map((it) => toItemType(it))
|
||||
const itemTypes = (infiniteData.value?.pages.flatMap((it) => it?.content ?? []) ?? []).map((it) =>
|
||||
toItemType(it),
|
||||
)
|
||||
return [
|
||||
{
|
||||
title: intl.formatMessage(filterMessages.any!),
|
||||
|
|
|
|||
Loading…
Reference in a new issue