fix: fetch tank ids

This commit is contained in:
TrèsAbhi committed 2024-07-08 19:41:56 -05:00
1 parent dae902fe03
commit 4d99e61bfb
1 file changed
+4 -1
+4 -1
View File
@@ -95,7 +95,7 @@ times(THREADS, async () => {
const players = await Promise.all(
filteredIds.map((id) =>
getTankStats(region, id, {
fields: 'last_battle_time,battle_life_time,all',
fields: 'last_battle_time,battle_life_time,all,tank_id',
}),
),
);
@@ -105,6 +105,9 @@ times(THREADS, async () => {
if (tank.all.battles === 0) return;
if (!tankIds.includes(tank.tank_id)) {
console.log(
`Found new tank: ${tank.tank_id} (${tankIds.length + 1})`,
);
tankIds.push(tank.tank_id);
tanksSorted[tank.tank_id] = [];
}