From f5c61063d508a7fb2e82614398f26b56a3eda362 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 10 Apr 2023 09:07:31 -0400 Subject: [PATCH] Removed mocked endpoint --- src/store/index.js | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 6da7550a2..127d3558f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -928,23 +928,13 @@ export const actions = { }, getServiceabilityDetails(context, { serviceZipCode }) { - return globalMethods.callMockHttpClient({ + const lineItems = context.getters.order.lineItems; + const lineItemsToSend = [...lineItems.supportingItems]; + const encodedLineItems = encodeURIComponent(JSON.stringify(lineItemsToSend)); + return globalMethods.callHttpClient({ method: endpoints.GetServiceabilityDetails.method, - //TODO: Remove Mocky Endpoints - //endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable - //endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInshop - //endpoint: "https://run.mocky.io/v3/e2eaa097-6ea5-4906-af53-901edaa94939", // ForcedMobile - endpoint: "https://run.mocky.io/v3/1811a1fe-12a7-48f3-939e-d10a9b77dd25", // All Options + endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}`, }); - - // TODO: Restore this when CSR-1104 is 100% complete - // const lineItems = context.getters.order.lineItems; - // const lineItemsToSend = [...lineItems.supportingItems]; - // const encodedLineItems = encodeURIComponent(JSON.stringify(lineItemsToSend)); - // return globalMethods.callHttpClient({ - // method: endpoints.GetServiceabilityDetails.method, - // endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}`, - // }); }, getSupportingItems(context) {