Switched frontend API calls to Nuxt

This commit is contained in:
lucast committed 2026-09-29 13:33:48 +02:00
1 parent 4621a81384
commit 47db7abd6a
5 files changed
+89 -69

No files matched your search

+2 -2
View File
@@ -3,11 +3,11 @@ const { data: genresData } = await useApiFetch<Genre[]>("/genres/random")
const data = await Promise.allSettled(
(genresData.value ?? []).map(async (genre: Genre) => {
const res = await cfetch(`/genres/albums/${genre._id}`)
const albums = await cfetch<Album[]>(`/genres/albums/${genre._id}`)
return {
genre,
albums: res.data,
albums,
}
}),
).then((results) =>