diff --git a/nuxt.config.ts b/nuxt.config.ts index 0011f20..6a6c5d0 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -63,6 +63,7 @@ export default defineNuxtConfig({ baseBranch: 'main', repo: 'test-repo', }, + datasource: 'local', }, }, }) diff --git a/server/api/data.get.ts b/server/api/data.get.ts index a6d00d4..a97932e 100644 --- a/server/api/data.get.ts +++ b/server/api/data.get.ts @@ -1,4 +1,6 @@ export default defineEventHandler(async () => { - // return $fetch('https://explorer-data.web3privacy.info/') + const { datasource } = useRuntimeConfig() + if (datasource === 'remote') + return $fetch('https://explorer-data.web3privacy.info/') return await useStorage('assets:server').getItem('data.json') })