CEC-5752 - Define trim as well as model for Flashpack mappings
This commit is contained in:
@@ -311,11 +311,11 @@ export const VehicleProvider = ({ children }) => {
|
||||
}
|
||||
};
|
||||
|
||||
const getFlashpackECUMappings = async (model, year, flashpack, options, token) => {
|
||||
const getFlashpackECUMappings = async (model, trim, year, flashpack, options, token) => {
|
||||
try {
|
||||
setBusy(true);
|
||||
|
||||
const result = await api.getFlashpackECUMappings(model, year, flashpack, options, token);
|
||||
const result = await api.getFlashpackECUMappings(model, trim, year, flashpack, options, token);
|
||||
if (result.error) {
|
||||
throw new Error(`Get flashpack ecu mappings error. ${result.message}`);
|
||||
}
|
||||
@@ -331,12 +331,13 @@ export const VehicleProvider = ({ children }) => {
|
||||
}
|
||||
};
|
||||
|
||||
const addFlashpackVersion = async (model, year, flashpack, carFlashpackVersions, token) => {
|
||||
const addFlashpackVersion = async (model, trim, year, flashpack, carFlashpackVersions, token) => {
|
||||
try {
|
||||
setBusy(true);
|
||||
|
||||
const data = {
|
||||
"car_model": model,
|
||||
"car_trim": trim,
|
||||
"car_year": year,
|
||||
"flashpack": flashpack,
|
||||
"ecu_versions": carFlashpackVersions,
|
||||
@@ -353,12 +354,13 @@ export const VehicleProvider = ({ children }) => {
|
||||
}
|
||||
}
|
||||
|
||||
const deleteFlashpackVersion = async (model, year, flashpack, token) => {
|
||||
const deleteFlashpackVersion = async (model, trim, year, flashpack, token) => {
|
||||
try {
|
||||
setBusy(true);
|
||||
|
||||
const data = {
|
||||
"car_model": model,
|
||||
"car_trim": trim,
|
||||
"car_year": year,
|
||||
"flashpack": flashpack,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user