This commit is contained in:
2023-11-16 11:26:17 +01:00
parent 98ce81dfb2
commit a1bffa1cdb
8 changed files with 73 additions and 17 deletions
+13 -3
View File
@@ -1,10 +1,20 @@
import { evepraisalAxiosInstance } from '@/service';
import { logResource } from '@/service';
import axios from 'axios';
import { MarketType } from "../type";
import { MarketTypePrice, PriceGetter } from './MarketTypePrice';
import { PriceGetter } from './MarketTypePrice';
export const evepraisalAxiosInstance = axios.create({
baseURL: '/evepraisal/',
headers: {
'accept': 'application/json',
"Content-Type": "application/json"
},
})
logResource(evepraisalAxiosInstance)
const batchSize = 100;
export const getEvepraisalPrices: PriceGetter = async (types: MarketType[]): Promise<MarketTypePrice[]> => {
export const getEvepraisalPrices: PriceGetter = async types => {
const batches = [];
for (let i = 0; i < types.length; i += batchSize) {