Fixed parsing vin01 response

This commit is contained in:
Selim Mustafaev 2020-10-09 21:38:15 +03:00
parent 3de6402756
commit e99b894b54

View File

@ -30,6 +30,12 @@ class Vin01Provider {
let json = await result.json();
if(json.status == 200) {
if(json.data.status != 200) {
console.log('Vin01 failed to get GIBDD report with status: ', json.data.status, ', and error: ', json.data.message);
let vehicle = new Vehicle();
vehicle.vin1 = vin;
return vehicle;
}
console.log('vin01 found history');
let vehicle = Vehicle.fromVin01(json.data);
vehicle.number = number;