CEC-287 Car connection status (#59) (#60)

* Car connection status

* Formatting
This commit is contained in:
John Wu
2021-06-23 14:52:12 -07:00
committed by GitHub
parent 99e24da105
commit e67d19edd7
6 changed files with 79 additions and 19 deletions

View File

@@ -39,6 +39,15 @@ const vehiclesAPI = {
}),
})
.then(fetchRespHandler),
getConnections: async (vins, token) => {
const u = `${API_ENDPOINT}/carsconnected?vins=${vins.join(",")}`
return fetch(u, {
method: "GET",
headers: Object.assign({ "Content-Type": "application/json" }, getAuthHeaderOptions(token)),
})
.then(fetchRespHandler)
},
};
export default vehiclesAPI;