explorer-app/server/api/data.get.ts

7 lines
251 B
TypeScript
Raw Normal View History

export default defineEventHandler(async () => {
const { datasource } = useRuntimeConfig()
if (datasource === 'remote')
return $fetch('https://explorer-data.web3privacy.info/')
return await useStorage('assets:server').getItem('data.json')
2023-12-19 18:43:42 +01:00
})