Increased some timeouts

This commit is contained in:
Selim Mustafaev 2021-10-21 22:50:12 +03:00
parent 2193aceaaa
commit 3b77fdd528

View File

@ -26,7 +26,7 @@ async function fetchWithTimeout(url, params, timeout) {
class Vin01Provider { class Vin01Provider {
static async getVin(number, token) { static async getVin(number, token) {
let url = `${baseUrl}/getVin.php?key=${token}&gosNumber=${encodeURIComponent(number)}`; let url = `${baseUrl}/getVin.php?key=${token}&gosNumber=${encodeURIComponent(number)}`;
let result = await fetchWithTimeout(url, null, 12000); let result = await fetchWithTimeout(url, null, 14000);
let json = await result.json(); let json = await result.json();
if(json.success && json.code == 200) { if(json.success && json.code == 200) {
return json.data.vin; return json.data.vin;
@ -44,7 +44,7 @@ class Vin01Provider {
key: token, key: token,
token: null token: null
}) })
}, 15000); }, 25000);
console.log('Vin01 response for: ', type); console.log('Vin01 response for: ', type);
return await result.json(); return await result.json();
} }