Skip to content

Commit 466d7c1

Browse files
Apply suggestion from @gemini-code-assist[bot]
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent fb3bd8b commit 466d7c1

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/utils/auth.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)