fix: use $fetch over fetch
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful

This commit is contained in:
Twig 2025-07-05 19:05:35 +02:00
parent 7098dda6b4
commit 2c4489917a
No known key found for this signature in database

View file

@ -60,14 +60,11 @@ function changeTheme(id: string, url: string) {
const fetchThemes = async () => {
for (const theme of defaultThemes) {
const themeConfig = await fetch(`${baseURL}themes/${theme}.json`)
const themeConfigJson = await themeConfig.json() as Theme
themeConfigJson.id = theme
const themeConfig = await $fetch(`${baseURL}themes/${theme}.json`) as Theme
themeConfig.id = theme
themes.push(themeConfigJson)
themes.push(themeConfig)
}
console.log(themes)
}
await fetchThemes()