CASH-2856 - if VinRequired use Parts Api v2 endpoint for Parts-Or-Questions
This commit is contained in:
parent
2b0e07948e
commit
f3b9c34656
2 changed files with 10 additions and 2 deletions
|
|
@ -56,6 +56,10 @@ const endpoints = {
|
||||||
url: "/parts/api/v1/parts/parts-or-questions",
|
url: "/parts/api/v1/parts/parts-or-questions",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
},
|
},
|
||||||
|
GetPartsOrQuestionsV2: {
|
||||||
|
url: "/parts/api/v2/parts/parts-or-questions",
|
||||||
|
method: "POST",
|
||||||
|
},
|
||||||
GetParts: {
|
GetParts: {
|
||||||
url: "/parts/api/v1/parts/parts",
|
url: "/parts/api/v1/parts/parts",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
|
||||||
|
|
@ -1970,10 +1970,14 @@ export const actions = {
|
||||||
// create a new array to avoid mutating state
|
// create a new array to avoid mutating state
|
||||||
const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray);
|
const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray);
|
||||||
|
|
||||||
|
const partsOrQuestionsEndpoint = vehicle.vinRequired
|
||||||
|
? endpoints.GetPartsOrQuestionsV2
|
||||||
|
: endpoints.GetPartsOrQuestions;
|
||||||
|
|
||||||
const response = await globalMethods
|
const response = await globalMethods
|
||||||
.callHttpClient({
|
.callHttpClient({
|
||||||
method: endpoints.GetPartsOrQuestions.method,
|
method: partsOrQuestionsEndpoint.method,
|
||||||
endpoint: endpoints.GetPartsOrQuestions.url,
|
endpoint: partsOrQuestionsEndpoint.url,
|
||||||
payload: {
|
payload: {
|
||||||
carId: carId,
|
carId: carId,
|
||||||
glassPieces: glassArrayForPayload,
|
glassPieces: glassArrayForPayload,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue