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:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user