File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -330,13 +330,16 @@ const setUserLikeDataLoop = async <T>(
330330 } catch ( error ) {
331331 console . error ( `Error fetching ${ key } data at offset ${ offset } :` , error ) ;
332332 break ;
333- if ( key === "artists" ) {
334- dataStore . setUserLikeData ( key , allData as ArtistType [ ] ) ;
335- } else if ( key === "playlists" || key === "albums" || key === "mvs" || key === "djs" ) {
336- dataStore . setUserLikeData ( key , allData as CoverType [ ] ) ;
337- } else {
338- console . error ( `Unsupported key in setUserLikeDataLoop: ${ key } ` ) ;
339- }
333+ }
334+ }
335+ // 保存数据
336+ if ( key === "artists" ) {
337+ dataStore . setUserLikeData ( key , allData as ArtistType [ ] ) ;
338+ } else if ( key === "playlists" || key === "albums" || key === "mvs" || key === "djs" ) {
339+ dataStore . setUserLikeData ( key , allData as CoverType [ ] ) ;
340+ } else {
341+ console . error ( `Unsupported key in setUserLikeDataLoop: ${ key } ` ) ;
342+ }
340343
341344 console . log ( `✅ Fetched ${ allData . length } ${ key } for user ${ userId } ` ) ;
342345 return allData ;
You can’t perform that action at this time.
0 commit comments