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,14 +330,13 @@ const setUserLikeDataLoop = async <T>(
330330 } catch ( error ) {
331331 console . error ( `Error fetching ${ key } data at offset ${ offset } :` , error ) ;
332332 break ;
333- }
334- }
335- // 保存数据
336- if ( key === "artists" ) {
337- dataStore . setUserLikeData ( key , allData as ArtistType [ ] ) ;
338- } else {
339- dataStore . setUserLikeData ( key , allData as CoverType [ ] ) ;
340- }
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+ }
341340
342341 console . log ( `✅ Fetched ${ allData . length } ${ key } for user ${ userId } ` ) ;
343342 return allData ;
You can’t perform that action at this time.
0 commit comments