Refactor decode to match existing partner.
This commit is contained in:
@@ -19,5 +19,5 @@ export interface DecodedStlLine {
|
||||
ttl_amt?: number;
|
||||
}
|
||||
export interface DecodedStl {
|
||||
cieca_stl: DecodedStlLine[];
|
||||
cieca_stl: { data: DecodedStlLine[] };
|
||||
}
|
||||
|
||||
@@ -57,6 +57,6 @@ const DecodeStl = async (
|
||||
//Apply business logic transfomrations.
|
||||
//We don't have an inspection date, we instead have `date_estimated`
|
||||
|
||||
return { cieca_stl: rawStlData };
|
||||
return { cieca_stl: { data: rawStlData } };
|
||||
};
|
||||
export default DecodeStl;
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface VehicleRecordInterface {
|
||||
impact2?: string;
|
||||
};
|
||||
// Paint code information
|
||||
paint_codes: {
|
||||
v_paint_codes: {
|
||||
paint_cd1: string;
|
||||
paint_cd2: string;
|
||||
paint_cd3: string;
|
||||
|
||||
@@ -77,7 +77,7 @@ const DecodeVeh = async (
|
||||
delete rawVehData.impact_2;
|
||||
|
||||
//Consolidate Paint Code information.
|
||||
rawVehData.paint_codes = {
|
||||
rawVehData.v_paint_codes = {
|
||||
paint_cd1: rawVehData.paint_cd1 ?? "",
|
||||
paint_cd2: rawVehData.paint_cd2 ?? "",
|
||||
paint_cd3: rawVehData.paint_cd3 ?? "",
|
||||
|
||||
Reference in New Issue
Block a user