CEC-4517 reset TBOX remote command (#369)

* CEC-4517 Diagnostic Commands tab

* snapshot
This commit is contained in:
Eduard Voronkin
2023-06-23 12:38:09 -07:00
committed by GitHub
parent 3d4a07d8d8
commit fc7c1ea514
7 changed files with 236 additions and 3 deletions

View File

@@ -173,6 +173,21 @@ const vehiclesAPI = {
.then(fetchRespHandler)
.catch(errorHandler),
sendDiagnosticCommand: async (vins, command, token) =>
fetch(`${API_ENDPOINT}/vehiclediagnosticcommand`, {
method: "POST",
headers: Object.assign(
{ "Content-Type": "application/json" },
getAuthHeaderOptions(token)
),
body: JSON.stringify({
vins,
...command,
}),
})
.then(fetchRespHandler)
.catch(errorHandler),
updateVehicle: async (vin, vehicle, token) =>
fetch(`${API_ENDPOINT}/vehicle/${vin}`, {
method: "PUT",