CEC-287 Car connection status (#59)

* Car connection status

* Formatting
This commit is contained in:
John Wu
2021-06-23 14:48:19 -07:00
committed by GitHub
parent 5b37f39e74
commit a3b6b01bf3
6 changed files with 79 additions and 19 deletions

View File

@@ -10,7 +10,7 @@ const data = [
];
const vehiclesAPI = {
getVehicles: async (search, token) => { return { data: { data } }; },
getVehicles: async (search, token) => { return { data }; },
addVehicle: async (vehicle, token) => {
data.push(vehicle);
return vehicle;
@@ -30,6 +30,15 @@ const vehiclesAPI = {
vin, command, parameters
}
},
getConnections: async (vins, token) => {
const result = {};
vins.forEach(vin => {
result[vin] = true;
});
return result;
}
};
export default vehiclesAPI;