mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Additional refactor for navidrome api controller types
This commit is contained in:
parent
b9d5447b4f
commit
40aabd2217
7 changed files with 53 additions and 48 deletions
|
|
@ -55,7 +55,7 @@ const authenticate = async (
|
|||
};
|
||||
}
|
||||
|
||||
await ssApiClient({ url: cleanServerUrl }).authenticate({
|
||||
await ssApiClient({ server: null, url: cleanServerUrl }).authenticate({
|
||||
query: {
|
||||
c: 'Feishin',
|
||||
f: 'json',
|
||||
|
|
@ -261,9 +261,11 @@ const getTopSongList = async (args: TopSongListArgs): Promise<SongListResponse>
|
|||
}
|
||||
|
||||
return {
|
||||
items: res.body.topSongs.song.map((song) => ssNormalize.song(song, apiClientProps.server, '')),
|
||||
items:
|
||||
res.body.topSongs?.song?.map((song) => ssNormalize.song(song, apiClientProps.server, '')) ||
|
||||
[],
|
||||
startIndex: 0,
|
||||
totalRecordCount: res.body.topSongs.song.length || 0,
|
||||
totalRecordCount: res.body.topSongs?.song?.length || 0,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue