Fix SS album detail response

This commit is contained in:
jeffvli
2022-12-09 03:05:20 -08:00
parent 46d948e00f
commit 38c9e329ac
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -200,7 +200,8 @@ const getAlbumDetail = async (args: AlbumDetailArgs): Promise<SSAlbumDetail> =>
}) })
.json<SSAlbumDetailResponse>(); .json<SSAlbumDetailResponse>();
return data.album; const { song: songs, ...dataWithoutSong } = data.album;
return { ...dataWithoutSong, songs };
}; };
const getAlbumList = async (args: AlbumListArgs): Promise<SSAlbumList> => { const getAlbumList = async (args: AlbumListArgs): Promise<SSAlbumList> => {
+1 -1
View File
@@ -55,7 +55,7 @@ export type SSAlbumListResponse = {
}; };
}; };
export type SSAlbumDetail = SSAlbum; export type SSAlbumDetail = Omit<SSAlbum, 'song'> & { songs: SSSong[] };
export type SSAlbumDetailResponse = { export type SSAlbumDetailResponse = {
album: SSAlbum; album: SSAlbum;