CEC-3863: Link azure file download (#309)

Co-authored-by: Alexander Andrews <aandrews@fiskerinc.com>
This commit is contained in:
Alexander Andrews
2023-04-06 15:29:05 -04:00
committed by GitHub
parent ead852d46a
commit 909f1e72c2
2 changed files with 32 additions and 4 deletions

View File

@@ -197,6 +197,18 @@ const vehiclesAPI = {
.then(fetchRespHandler)
.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)
.catch(errorHandler)
},
};
export default vehiclesAPI;