feat: made WARGAMING_APPLICATION_ID public

This commit is contained in:
TresAbhi committed 2023-09-23 21:51:00 +00:00
1 parent 018783bb47
commit e37e0ccf9f
31 files changed
+196 -80

No files matched your search

@@ -34,6 +34,7 @@ export const emptyTankHistoryNode: TankHistoryRaw = {
all: emptyAllStats,
};
// BIG TODO: merge this neatly with diffNormalizedTankStats
export default async function getDiffedTankStats(
server: Region,
id: number,
+2 -2
View File
@@ -1,4 +1,5 @@
import { Region } from '../../constants/regions';
import { WARGAMING_APPLICATION_ID } from '../../constants/wargamingApplicationID';
import { AccountInfo, AllStats } from '../../types/accountInfo';
import {
GetHistoriesOptions,
@@ -7,7 +8,6 @@ import {
getHistoriesDefaultOptions,
} from '../../types/histories';
import getWargamingResponse from '../blitz/getWargamingResponse';
import { secrets } from '../node/secrets';
import { emptyAllStats } from './getDiffedTankStats';
export interface PlayerHistoryRaw {
@@ -67,7 +67,7 @@ export default async function getPlayerHistories(
statistics: { all },
} = (
await getWargamingResponse<AccountInfo>(
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${secrets.WARGAMING_APPLICATION_ID}&account_id=${id}`,
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`,
)
)[id];