From 4324f0ee5fba57eb084172290125ba1ed9b5420e Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 31 Oct 2022 14:25:13 -0400 Subject: [PATCH] CSR-803: merge --- src/global-methods.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/global-methods.js b/src/global-methods.js index 14e5cca0e..30eeffb65 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -7,6 +7,7 @@ import { GaCategories, GaActions, GaLabels } from "@/constants/analytics"; import { headerKeys } from "@/constants/header-keys"; export default { +<<<<<<< Updated upstream callHttpClient({ method, endpoint, payload, logApiCall = true }) { return new Promise((resolve, reject) => { const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO; @@ -14,6 +15,21 @@ export default { const headers = { [headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings), }; +======= + callHttpClient({ method, endpoint, payload, logApiCall = true }) { + return new Promise((resolve, reject) => { + let cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO; + if (endpoint.includes("/order/")) { + cfDistroUrl = "https://localhost:5001"; + } + if (endpoint.includes("/parts/")) { + cfDistroUrl = "https://localhost:5003"; + } + const payloadAndAnalyticsData = Object.assign({}, payload, { AppName: "FixMyGlass" }); + const headers = { + [headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings) + } +>>>>>>> Stashed changes axios({ method: method,