mirror of
https://github.com/web3privacy/explorer-app.git
synced 2024-10-15 16:46:26 +02:00
feat(datasource): update runtime config for datasource option
This commit is contained in:
parent
609e9ce500
commit
c6e6be3bac
2 changed files with 4 additions and 1 deletions
|
@ -63,6 +63,7 @@ export default defineNuxtConfig({
|
|||
baseBranch: 'main',
|
||||
repo: 'test-repo',
|
||||
},
|
||||
datasource: 'local',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -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')
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue