CEC-4100: Added push config changes to vin (#338)
This commit is contained in:
committed by
GitHub
parent
8e71cf6c8c
commit
bf0fb5363b
@@ -173,6 +173,17 @@ const vehiclesAPI = {
|
||||
.then(fetchRespHandler)
|
||||
.catch(errorHandler),
|
||||
|
||||
updateConfig: async (vin, token) =>
|
||||
fetch(`${API_ENDPOINT}/car_config/${vin}`, {
|
||||
method: "POST",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token)
|
||||
)
|
||||
})
|
||||
.then(fetchRespHandler)
|
||||
.catch(errorHandler),
|
||||
|
||||
getCANSignals: async (vin, token) =>
|
||||
fetch(`${API_ENDPOINT}/cansignals/${vin}`, {
|
||||
method: "GET",
|
||||
@@ -209,15 +220,15 @@ const vehiclesAPI = {
|
||||
.catch(errorHandler)
|
||||
},
|
||||
|
||||
getLogFileLink: async ({vin, year, month, day}, token) => {
|
||||
const u = `${API_ENDPOINT}/vehicle/${vin}/trex-logs-link?year=${year}&month=${month}&day=${day}`
|
||||
return fetch(u, {
|
||||
method: "GET",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token)
|
||||
),
|
||||
}).then(fetchRespHandler)
|
||||
getLogFileLink: async ({ vin, year, month, day }, token) => {
|
||||
const u = `${API_ENDPOINT}/vehicle/${vin}/trex-logs-link?year=${year}&month=${month}&day=${day}`
|
||||
return fetch(u, {
|
||||
method: "GET",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token)
|
||||
),
|
||||
}).then(fetchRespHandler)
|
||||
.catch(errorHandler)
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user