Add song detail controller

This commit is contained in:
jeffvli 2023-05-19 22:20:32 -07:00 committed by Jeff
parent 2cefc092ce
commit c4fb9a2e72
4 changed files with 37 additions and 3 deletions

View file

@ -11,6 +11,7 @@ import type {
AlbumArtistDetailQuery,
TopSongListQuery,
SearchQuery,
SongDetailQuery,
} from './types';
export const queryKeys = {
@ -88,6 +89,10 @@ export const queryKeys = {
root: (serverId: string) => [serverId] as const,
},
songs: {
detail: (serverId: string, query?: SongDetailQuery) => {
if (query) return [serverId, 'songs', 'detail', query] as const;
return [serverId, 'songs', 'detail'] as const;
},
list: (serverId: string, query?: SongListQuery) => {
if (query) return [serverId, 'songs', 'list', query] as const;
return [serverId, 'songs', 'list'] as const;