mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: use corsproxy.io
This commit is contained in:
1 parent
81c2ca80bc
commit
6b6ee94d9b
8 files changed
+20
-34
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { AllStats } from '../blitz/getAccountInfo';
|
||||
import { context } from '../blitzkrieg/context';
|
||||
import { withCORSProxy } from '../blitzkrieg/withCORSProxy';
|
||||
import { tankopedia } from './tankopedia';
|
||||
|
||||
export interface SpecialStats {
|
||||
@@ -85,9 +86,7 @@ tankopedia;
|
||||
export type TankAverages = Record<number, IndividualTankAverage>;
|
||||
|
||||
export const tankAverages = fetch(
|
||||
context === 'bot'
|
||||
? 'https://www.blitzstars.com/api/tankaverages.json'
|
||||
: '/api/tank-averages',
|
||||
withCORSProxy('https://www.blitzstars.com/api/tankaverages.json'),
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((json) => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { deburr } from 'lodash';
|
||||
import { context } from '../blitzkrieg/context';
|
||||
import { withCORSProxy } from '../blitzkrieg/withCORSProxy';
|
||||
|
||||
export interface TankopediaEntry {
|
||||
name: string;
|
||||
@@ -18,9 +19,7 @@ export interface Tankopedia {
|
||||
}
|
||||
|
||||
export const tankopedia = fetch(
|
||||
context === 'bot'
|
||||
? 'https://www.blitzstars.com/bs-tankopedia.json'
|
||||
: '/api/tankopedia',
|
||||
withCORSProxy('https://www.blitzstars.com/bs-tankopedia.json'),
|
||||
)
|
||||
.then(async (response) => response.json())
|
||||
.then((wrapperTankopedia) =>
|
||||
|
||||
Reference in new issue
Block a user