mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: removed non-proxy apis
This commit is contained in:
1 parent
925ac96264
commit
6ff2a23ff7
11 files changed
+54
-65
No files matched your search
@@ -22,8 +22,12 @@ export interface Tankopedia {
|
||||
}
|
||||
|
||||
console.log('Caching tankopedia...');
|
||||
export const tankopedia = fetch('https://www.blitzstars.com/bs-tankopedia.json')
|
||||
.then((response) => response.json())
|
||||
export const tankopedia = fetch(
|
||||
typeof window === 'undefined'
|
||||
? 'https://www.blitzstars.com/bs-tankopedia.json'
|
||||
: '/api/tankopedia',
|
||||
)
|
||||
.then(async (response) => response.json())
|
||||
.then((wrapperTankopedia) => {
|
||||
console.log('Tankopedia cached');
|
||||
return (wrapperTankopedia as { data: Tankopedia }).data;
|
||||
|
||||
Reference in new issue
Block a user