CEC-3577: fetch T.Rex log from the cloud (#283)

* CEC-3577: fetch T.Rex log from the cloud

* tabs?

* CSS

* smells

* fix smells and warnings

* suggestions
This commit is contained in:
Eduard Voronkin
2023-02-17 14:53:36 -08:00
committed by GitHub
parent f2aa5d00fb
commit 749f1672da
7 changed files with 397 additions and 4 deletions

View File

@@ -173,6 +173,17 @@ const vehiclesAPI = {
.then(fetchRespHandler)
.catch(errorHandler),
getTRexLogs: async (vin, date, offset, count, direction, token) =>
fetch(`${API_ENDPOINT}/vehicle/${vin}/trex-logs?date=${date}&offset=${offset}&count=${count}&direction=${direction}`, {
method: "GET",
headers: Object.assign(
{ "Content-Type": "application/json" },
getAuthHeaderOptions(token)
),
})
.then(fetchRespHandler)
.catch(errorHandler),
getVersionLog: async ({vin, ...search}, token) => {
const u = addQueryParams(`${API_ENDPOINT}/vehicle/${vin}/version/logs`, search);
return fetch(u, {