CEC-5900 - Add the ability to edit Flashpack versions after they are added
This commit is contained in:
@@ -295,6 +295,18 @@ const vehiclesAPI = {
|
||||
.catch(errorHandler)
|
||||
},
|
||||
|
||||
addFlashpackVersionECUMapping: async (model, trim, year, flashpack, data, token) => {
|
||||
return fetch(`${API_ENDPOINT}/flashpack_version_ecu_mapping/${model}/${trim}/${year}/${flashpack}`, {
|
||||
method: "POST",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token),
|
||||
),
|
||||
body: JSON.stringify(data),
|
||||
}).then(fetchRespHandler)
|
||||
.catch(errorHandler)
|
||||
},
|
||||
|
||||
deleteFlashpackVersion: async (data, token) => {
|
||||
return fetch(`${API_ENDPOINT}/flashpack_version`, {
|
||||
method: "DELETE",
|
||||
@@ -307,6 +319,17 @@ const vehiclesAPI = {
|
||||
.catch(errorHandler)
|
||||
},
|
||||
|
||||
deleteFlashpackVersionECUMapping: async (model, trim, year, flashpack, ecuName, ecuVersion, token) => {
|
||||
return fetch(`${API_ENDPOINT}/flashpack_version_ecu_mapping/${model}/${trim}/${year}/${flashpack}/${ecuName}/${ecuVersion}`, {
|
||||
method: "DELETE",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token)
|
||||
),
|
||||
}).then(fetchRespHandler)
|
||||
.catch(errorHandler)
|
||||
},
|
||||
|
||||
getCarFlashpackVersionInfo: async (vin, token) => {
|
||||
return fetch(`${API_ENDPOINT}/flashpack_version_info/${vin}`, {
|
||||
method: "GET",
|
||||
|
||||
Reference in New Issue
Block a user