mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 21:10:12 +02:00
remove limit / startIndex from count query args
This commit is contained in:
@@ -4,7 +4,7 @@ import { api } from '/@/renderer/api';
|
||||
import { queryKeys } from '/@/renderer/api/query-keys';
|
||||
import { QueryHookArgs } from '/@/renderer/lib/react-query';
|
||||
import { getServerById } from '/@/renderer/store';
|
||||
import { AlbumDetailQuery, AlbumListQuery } from '/@/shared/types/domain-types';
|
||||
import { AlbumDetailQuery, AlbumListQuery, ListCountQuery } from '/@/shared/types/domain-types';
|
||||
|
||||
export const albumQueries = {
|
||||
detail: (args: QueryHookArgs<AlbumDetailQuery>) => {
|
||||
@@ -35,7 +35,7 @@ export const albumQueries = {
|
||||
...args.options,
|
||||
});
|
||||
},
|
||||
listCount: (args: QueryHookArgs<AlbumListQuery>) => {
|
||||
listCount: (args: QueryHookArgs<ListCountQuery<AlbumListQuery>>) => {
|
||||
return queryOptions({
|
||||
queryFn: ({ signal }) => {
|
||||
return api.controller.getAlbumListCount({
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
AlbumArtistDetailQuery,
|
||||
AlbumArtistListQuery,
|
||||
ArtistListQuery,
|
||||
ListCountQuery,
|
||||
TopSongListQuery,
|
||||
} from '/@/shared/types/domain-types';
|
||||
|
||||
@@ -36,7 +37,7 @@ export const artistsQueries = {
|
||||
...args.options,
|
||||
});
|
||||
},
|
||||
albumArtistListCount: (args: QueryHookArgs<AlbumArtistListQuery>) => {
|
||||
albumArtistListCount: (args: QueryHookArgs<ListCountQuery<AlbumArtistListQuery>>) => {
|
||||
return queryOptions({
|
||||
queryFn: ({ signal }) => {
|
||||
return api.controller.getAlbumArtistListCount({
|
||||
@@ -51,7 +52,7 @@ export const artistsQueries = {
|
||||
...args.options,
|
||||
});
|
||||
},
|
||||
artistListCount: (args: QueryHookArgs<ArtistListQuery>) => {
|
||||
artistListCount: (args: QueryHookArgs<ListCountQuery<ArtistListQuery>>) => {
|
||||
return queryOptions({
|
||||
queryFn: ({ signal }) => {
|
||||
return api.controller.getArtistListCount({
|
||||
|
||||
@@ -5,7 +5,7 @@ import { controller } from '/@/renderer/api/controller';
|
||||
import { queryKeys } from '/@/renderer/api/query-keys';
|
||||
import { QueryHookArgs } from '/@/renderer/lib/react-query';
|
||||
import { getServerById } from '/@/renderer/store';
|
||||
import { SimilarSongsQuery, SongListQuery } from '/@/shared/types/domain-types';
|
||||
import { ListCountQuery, SimilarSongsQuery, SongListQuery } from '/@/shared/types/domain-types';
|
||||
|
||||
export const songsQueries = {
|
||||
list: (args: QueryHookArgs<SongListQuery>, imageSize?: number) => {
|
||||
@@ -22,7 +22,7 @@ export const songsQueries = {
|
||||
...args.options,
|
||||
});
|
||||
},
|
||||
listCount: (args: QueryHookArgs<SongListQuery>) => {
|
||||
listCount: (args: QueryHookArgs<ListCountQuery<SongListQuery>>) => {
|
||||
return queryOptions({
|
||||
queryFn: ({ signal }) => {
|
||||
const server = getServerById(args.serverId);
|
||||
|
||||
Reference in New Issue
Block a user