diff --git a/config/config.toml b/config/config.toml index bf8043abf..80696aa4f 100644 --- a/config/config.toml +++ b/config/config.toml @@ -48,3 +48,4 @@ new_analytics=false down_time=false tax_processor=true transaction_view=false +x_feature_route=false diff --git a/src/components/AdvancedSearchComponent.res b/src/components/AdvancedSearchComponent.res index 642f4c069..e49b4d708 100644 --- a/src/components/AdvancedSearchComponent.res +++ b/src/components/AdvancedSearchComponent.res @@ -17,11 +17,12 @@ let make = (~children, ~setData=?, ~entity: EntityType.entityType<'colType, 't>, let initialValueJson = JSON.Encode.object(Dict.make()) let showToast = ToastState.useShowToast() let (showModal, setShowModal) = React.useState(_ => false) + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let onSubmit = (values, form: ReactFinalForm.formApi) => { open Promise - fetchApi(url, ~bodyStr=JSON.stringify(values), ~method_=Post) + fetchApi(url, ~bodyStr=JSON.stringify(values), ~method_=Post, ~xFeatureRoute) ->then(res => res->Fetch.Response.json) ->then(json => { let jsonData = json->JSON.Decode.object->Option.flatMap(dict => dict->Dict.get("rows")) diff --git a/src/components/AdvancedSearchModal.res b/src/components/AdvancedSearchModal.res index 85f04c83a..30b8cab47 100644 --- a/src/components/AdvancedSearchModal.res +++ b/src/components/AdvancedSearchModal.res @@ -20,6 +20,7 @@ module AdvanceSearch = { let fetchApi = AuthHooks.useApiFetcher() let initialValueJson = JSON.Encode.object(Dict.make()) let showToast = ToastState.useShowToast() + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let onSubmit = (values, _) => { let otherQueries = switch values->JSON.Decode.object { @@ -41,7 +42,7 @@ module AdvanceSearch = { let finalUrl = otherQueries->isNonEmptyString ? `${url}?${otherQueries}` : url open Promise - fetchApi(finalUrl, ~bodyStr=JSON.stringify(initialValueJson), ~method_=Get) + fetchApi(finalUrl, ~bodyStr=JSON.stringify(initialValueJson), ~method_=Get, ~xFeatureRoute) ->then(res => res->Fetch.Response.json) ->then(json => { switch JSON.Classify.classify(json) { diff --git a/src/components/DynamicChart.res b/src/components/DynamicChart.res index 313103c4f..77fb0181d 100644 --- a/src/components/DynamicChart.res +++ b/src/components/DynamicChart.res @@ -234,6 +234,8 @@ let makeEntity = ( let useChartFetch = (~setStatusDict) => { let fetchApi = AuthHooks.useApiFetcher() let addLogsAroundFetch = AnalyticsLogUtilsHook.useAddLogsAroundFetch() + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom + let fetchChartData = (updatedChartBody: array, setState) => { open Promise @@ -244,6 +246,7 @@ let useChartFetch = (~setStatusDict) => { ~method_=Post, ~bodyStr=item.body, ~headers=[("QueryType", "Chart")]->Dict.fromArray, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle="Chart Data Api", ~setStatusDict) ->then(json => { @@ -258,6 +261,7 @@ let useChartFetch = (~setStatusDict) => { ~method_=Post, ~bodyStr=legendBody, ~headers=[("QueryType", "Chart")]->Dict.fromArray, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle="Chart Data Api", ~setStatusDict) ->then( diff --git a/src/components/DynamicSingleStat.res b/src/components/DynamicSingleStat.res index b0a9e24d0..6c53eebd1 100644 --- a/src/components/DynamicSingleStat.res +++ b/src/components/DynamicSingleStat.res @@ -141,6 +141,8 @@ let make = ( ~formaPayload: option string>=?, ) => { open LogicUtils + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom + let {filterValueJson} = React.useContext(FilterContext.filterContext) let fetchApi = AuthHooks.useApiFetcher() let getAllFilter = filterValueJson @@ -304,6 +306,7 @@ let make = ( ~method_=Post, ~bodyStr=singleStatBody, ~headers=[("QueryType", "SingleStat")]->Dict.fromArray, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle="SingleStat Data Api") ->then(json => resolve((`${urlConfig.prefix->Option.getOr("")}${uri}`, json))) @@ -377,6 +380,7 @@ let make = ( ~method_=Post, ~bodyStr=singleStatBodyMakerFn(singleStatBodyEntity), ~headers=[("QueryType", "SingleStatTimeseries")]->Dict.fromArray, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle="SingleStatTimeseries Data Api") ->then( diff --git a/src/components/DynamicTable.res b/src/components/DynamicTable.res index e2a615009..67fceb86b 100644 --- a/src/components/DynamicTable.res +++ b/src/components/DynamicTable.res @@ -115,6 +115,7 @@ let make = ( filterCheck, filterForRow, } = entity + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let tableName = prefixAddition->Option.getOr(false) ? title->(String.replaceRegExp(_, %re("/ /g"), "-"))->String.toLowerCase->Some @@ -236,7 +237,7 @@ let make = ( } let uri = uri ++ getNewUrl(defaultFilters) setTableDataLoading(_ => true) - fetchApi(uri, ~bodyStr=JSON.stringify(finalJson), ~headers, ~method_=method) + fetchApi(uri, ~bodyStr=JSON.stringify(finalJson), ~headers, ~method_=method, ~xFeatureRoute) ->then(resp => { let status = resp->Fetch.Response.status if status >= 300 { diff --git a/src/components/custom-icons/LottieFiles.res b/src/components/custom-icons/LottieFiles.res index e8dd38203..f833d2681 100644 --- a/src/components/custom-icons/LottieFiles.res +++ b/src/components/custom-icons/LottieFiles.res @@ -16,7 +16,6 @@ let useLottieJson = lottieFileName => { let uriPrefix = LogicUtils.useUrlPrefix() let showToast = ToastState.useShowToast() let prefix = `${Window.Location.origin}${uriPrefix}` - React.useEffect(() => { switch lottieDict->Dict.get(lottieFileName) { | Some(val) => @@ -26,7 +25,7 @@ let useLottieJson = lottieFileName => { } | None => { let fetchLottie = - fetchApi(`${prefix}/lottie-files/${lottieFileName}`, ~method_=Get) + fetchApi(`${prefix}/lottie-files/${lottieFileName}`, ~method_=Get, ~xFeatureRoute=false) ->then(res => res->Fetch.Response.json) ->then(json => { setlottieJson(_ => json) diff --git a/src/context/ChartContext.res b/src/context/ChartContext.res index 59c41668f..c7344c968 100644 --- a/src/context/ChartContext.res +++ b/src/context/ChartContext.res @@ -91,6 +91,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF let defaultFilters = [startTimeFilterKey, endTimeFilterKey] let {allFilterDimension} = chartEntity + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let sortingParams = React.useMemo((): option => { switch chartEntity { @@ -342,6 +343,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF )->JSON.stringify, ~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle=`Chart fetch`) ->then( @@ -400,6 +402,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF )->JSON.stringify, ~headers=[("QueryType", "Chart Legend")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle=`Chart legend Data`) ->then(text => { @@ -467,6 +470,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF )->JSON.stringify, ~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle=`Chart fetch bottomChart`) ->then( @@ -522,6 +526,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF )->JSON.stringify, ~headers=[("QueryType", "Chart Legend")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle=`Chart legend Data`) ->then(text => { @@ -579,6 +584,7 @@ module SDKAnalyticsChartContext = { ~segmentValue: option>=?, ~differentTimeValues: option>=?, ) => { + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let parentToken = AuthWrapperUtils.useTokenParent(Original) let addLogsAroundFetch = AnalyticsLogUtilsHook.useAddLogsAroundFetchNew() let betaEndPointConfig = React.useContext(BetaEndPointConfigProvider.betaEndPointConfig) @@ -810,6 +816,7 @@ module SDKAnalyticsChartContext = { )->JSON.stringify, ~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle=`Chart fetch`) ->then(text => { @@ -849,6 +856,7 @@ module SDKAnalyticsChartContext = { )->JSON.stringify, ~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle=`Chart fetch`) ->then( diff --git a/src/context/SingleStatContext.res b/src/context/SingleStatContext.res index afefc9801..bc53eda89 100644 --- a/src/context/SingleStatContext.res +++ b/src/context/SingleStatContext.res @@ -57,7 +57,7 @@ let make = ( let addLogsAroundFetch = AnalyticsLogUtilsHook.useAddLogsAroundFetchNew() let betaEndPointConfig = React.useContext(BetaEndPointConfigProvider.betaEndPointConfig) let fetchApi = AuthHooks.useApiFetcher() - + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let getTopLevelSingleStatFilter = React.useMemo(() => { getAllFilter ->Dict.toArray @@ -259,6 +259,7 @@ let make = ( )->JSON.stringify, ~headers=[("QueryType", "SingleStatHistoric")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch( ~logTitle=`SingleStat histotic data for metrics ${metrics->metrixMapper}`, @@ -309,6 +310,7 @@ let make = ( )->JSON.stringify, ~headers=[("QueryType", "SingleStat")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch(~logTitle=`SingleStat data for metrics ${metrics->metrixMapper}`) ->then( @@ -358,6 +360,7 @@ let make = ( )->JSON.stringify, ~headers=[("QueryType", "SingleStat Time Series")]->Dict.fromArray, ~betaEndpointConfig=?betaEndPointConfig, + ~xFeatureRoute, ) ->addLogsAroundFetch( ~logTitle=`SingleStat Time Series data for metrics ${metrics->metrixMapper}`, diff --git a/src/entryPoints/AuthModule/UserInfo/UserInfoProvider.res b/src/entryPoints/AuthModule/UserInfo/UserInfoProvider.res index cdc155549..2e71003b1 100644 --- a/src/entryPoints/AuthModule/UserInfo/UserInfoProvider.res +++ b/src/entryPoints/AuthModule/UserInfo/UserInfoProvider.res @@ -9,11 +9,12 @@ let make = (~children) => { let (screenState, setScreenState) = React.useState(_ => Loading) let (userInfo, setUserInfo) = React.useState(_ => UserInfoUtils.defaultValueOfUserInfo) let fetchApi = AuthHooks.useApiFetcher() + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let getUserInfo = async () => { open LogicUtils let url = `${Window.env.apiBaseUrl}/user` try { - let res = await fetchApi(`${url}`, ~method_=Get) + let res = await fetchApi(`${url}`, ~method_=Get, ~xFeatureRoute) let response = await res->(res => res->Fetch.Response.json) let userInfo = response->getDictFromJsonObject->UserInfoUtils.itemMapper setUserInfo(_ => userInfo) diff --git a/src/entryPoints/FeatureFlagUtils.res b/src/entryPoints/FeatureFlagUtils.res index 4b0cb2677..a73672db8 100644 --- a/src/entryPoints/FeatureFlagUtils.res +++ b/src/entryPoints/FeatureFlagUtils.res @@ -35,6 +35,7 @@ type featureFlag = { downTime: bool, taxProcessor: bool, transactionView: bool, + xFeatureRoute: bool, } let featureFlagType = (featureFlags: JSON.t) => { @@ -77,6 +78,7 @@ let featureFlagType = (featureFlags: JSON.t) => { downTime: dict->getBool("down_time", false), taxProcessor: dict->getBool("tax_processor", false), transactionView: dict->getBool("transaction_view", false), + xFeatureRoute: dict->getBool("x_feature_route", false), } typedFeatureFlag } diff --git a/src/hooks/AuthHooks.res b/src/hooks/AuthHooks.res index 30c746f74..f2a6fffd9 100644 --- a/src/hooks/AuthHooks.res +++ b/src/hooks/AuthHooks.res @@ -1,6 +1,19 @@ type contentType = Headers(string) | Unknown +let headersForXFeature = (~uri, ~headers) => { + if uri->String.includes("lottie-files") || uri->String.includes("config/merchant-access") { + headers->Dict.set("Content-Type", `application/json`) + } else { + headers->Dict.set("x-feature", "router-custom") + } +} -let getHeaders = (~uri, ~headers, ~contentType=Headers("application/json"), ~token) => { +let getHeaders = ( + ~uri, + ~headers, + ~contentType=Headers("application/json"), + ~xFeatureRoute, + ~token, +) => { let isMixpanel = uri->String.includes("mixpanel") let headerObj = if isMixpanel { @@ -9,20 +22,21 @@ let getHeaders = (~uri, ~headers, ~contentType=Headers("application/json"), ~tok ("accept", "application/json"), ]->Dict.fromArray } else { - let res = switch token { + switch token { | Some(str) => { headers->Dict.set("authorization", `Bearer ${str}`) headers->Dict.set("api-key", `hyperswitch`) - - headers + if xFeatureRoute { + headersForXFeature(~headers, ~uri) + } } - | None => headers + | None => () } switch contentType { | Headers(headerString) => headers->Dict.set("Content-Type", headerString) | Unknown => () } - res + headers } Fetch.HeadersInit.make(headerObj->Identity.dictOfAnyTypeToObj) } @@ -38,7 +52,6 @@ let useApiFetcher = () => { let {authStatus, setAuthStateToLogout} = React.useContext(AuthInfoProvider.authStatusContext) let setReqProgress = Recoil.useSetRecoilState(ApiProgressHooks.pendingRequestCount) - React.useCallback( ( uri, @@ -48,6 +61,7 @@ let useApiFetcher = () => { ~method_: Fetch.requestMethod, ~betaEndpointConfig=?, ~contentType=Headers("application/json"), + ~xFeatureRoute, ) => { let token = { switch authStatus { @@ -81,7 +95,7 @@ let useApiFetcher = () => { ~method_, ~body?, ~credentials=SameOrigin, - ~headers=getHeaders(~headers, ~uri, ~contentType, ~token), + ~headers=getHeaders(~headers, ~uri, ~contentType, ~token, ~xFeatureRoute), ), ) ->catch( diff --git a/src/screens/APIUtils/APIUtils.res b/src/screens/APIUtils/APIUtils.res index 967a04e2d..2dd442a2d 100644 --- a/src/screens/APIUtils/APIUtils.res +++ b/src/screens/APIUtils/APIUtils.res @@ -722,13 +722,13 @@ let useHandleLogout = () => { let {setAuthStateToLogout} = React.useContext(AuthInfoProvider.authStatusContext) let clearRecoilValue = ClearRecoilValueHook.useClearRecoilValue() let fetchApi = AuthHooks.useApiFetcher() - + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom () => { try { let logoutUrl = getURL(~entityName=USERS, ~methodType=Post, ~userType=#SIGNOUT) open Promise let _ = - fetchApi(logoutUrl, ~method_=Post) + fetchApi(logoutUrl, ~method_=Post, ~xFeatureRoute) ->then(Fetch.Response.json) ->then(json => { json->resolve @@ -883,10 +883,11 @@ let useGetMethod = (~showErrorToast=true) => { }, }, }) + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom async url => { try { - let res = await fetchApi(url, ~method_=Get) + let res = await fetchApi(url, ~method_=Get, ~xFeatureRoute) await responseHandler( ~res, ~showErrorToast, @@ -927,6 +928,7 @@ let useUpdateMethod = (~showErrorToast=true) => { }, }, }) + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom async ( url, @@ -944,6 +946,7 @@ let useUpdateMethod = (~showErrorToast=true) => { ~bodyFormData, ~headers, ~contentType, + ~xFeatureRoute, ) await responseHandler( ~res, diff --git a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res index 1981c9ab5..f5e0c63b7 100644 --- a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res +++ b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res @@ -63,7 +63,7 @@ let make = ( let downloadApplePayCert = () => { open Promise let downloadURL = Window.env.applePayCertificateUrl->Option.getOr("") - fetchApi(downloadURL, ~method_=Get) + fetchApi(downloadURL, ~method_=Get, ~xFeatureRoute=featureFlagDetails.xFeatureRoute) ->then(Fetch.Response.blob) ->then(content => { DownloadUtils.download( diff --git a/src/screens/Hooks/OMPSwitchHooks.res b/src/screens/Hooks/OMPSwitchHooks.res index 9ebf57d99..ad576a9a4 100644 --- a/src/screens/Hooks/OMPSwitchHooks.res +++ b/src/screens/Hooks/OMPSwitchHooks.res @@ -8,10 +8,11 @@ let useUserInfo = () => { let fetchApi = AuthHooks.useApiFetcher() let {setUserInfoData, userInfo} = React.useContext(UserInfoProvider.defaultContext) let url = `${Window.env.apiBaseUrl}/user` + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let getUserInfo = async () => { try { - let res = await fetchApi(`${url}`, ~method_=Get) + let res = await fetchApi(`${url}`, ~method_=Get, ~xFeatureRoute) let response = await res->(res => res->Fetch.Response.json) let userInfo = response->getDictFromJsonObject->UserInfoUtils.itemMapper setUserInfoData(userInfo) diff --git a/src/screens/MixpanelHook.res b/src/screens/MixpanelHook.res index f406f9cff..fc081abf1 100644 --- a/src/screens/MixpanelHook.res +++ b/src/screens/MixpanelHook.res @@ -70,6 +70,7 @@ let useSendEvent = () => { `${getHostUrl}/mixpanel/track`, ~method_=Post, ~bodyStr=`data=${body->JSON.stringifyAny->Option.getOr("")->encodeURI}`, + ~xFeatureRoute=featureFlagDetails.xFeatureRoute, ) } catch { | _ => () @@ -133,6 +134,7 @@ let usePageView = () => { `${getHostUrl}/mixpanel/track`, ~method_=Post, ~bodyStr=`data=${body->JSON.stringifyAny->Option.getOr("")->encodeURI}`, + ~xFeatureRoute=featureFlagDetails.xFeatureRoute, ) } } catch { @@ -171,11 +173,13 @@ let useSetIdentity = () => { `${getHostUrl}/mixpanel/track`, ~method_=Post, ~bodyStr=`data=${body->JSON.stringifyAny->Option.getOr("")->encodeURI}`, + ~xFeatureRoute=featureFlagDetails.xFeatureRoute, ) let _ = await fetchApi( `${getHostUrl}/mixpanel/engage`, ~method_=Post, ~bodyStr=`data=${peopleProperties->JSON.stringifyAny->Option.getOr("")->encodeURI}`, + ~xFeatureRoute=featureFlagDetails.xFeatureRoute, ) } } catch { diff --git a/src/screens/NewAnalytics/PaymentAnalytics/PaymentsLifeCycle/PaymentsLifeCycleUtils.res b/src/screens/NewAnalytics/PaymentAnalytics/PaymentsLifeCycle/PaymentsLifeCycleUtils.res index 610419c1a..1da581b6c 100644 --- a/src/screens/NewAnalytics/PaymentAnalytics/PaymentsLifeCycle/PaymentsLifeCycleUtils.res +++ b/src/screens/NewAnalytics/PaymentAnalytics/PaymentsLifeCycle/PaymentsLifeCycleUtils.res @@ -39,7 +39,7 @@ let paymentsLifeCycleMapper = ( let disputed = data.disputed let processedData = [ - ("Payments Initiated", "Success", totalPayment, "#E4EFFF"), + ("Payments Initiated", "Success", success, "#E4EFFF"), ("Payments Initiated", "Non-terminal state", customerAwaited, "#E4EFFF"), ("Success", "Dispute Raised", disputed, "#F7E0E0"), ("Success", "Refunds Issued", refunded, "#E4EFFF"), diff --git a/src/screens/SDKPayment/WebSDK.res b/src/screens/SDKPayment/WebSDK.res index 7cfcf8c71..5a1dd0bef 100644 --- a/src/screens/SDKPayment/WebSDK.res +++ b/src/screens/SDKPayment/WebSDK.res @@ -61,6 +61,7 @@ module CheckoutForm = { ~bodyStr=val->JSON.stringifyAny->Option.getOr(""), ~headers=[("Access-Control-Allow-Origin", "*")]->Dict.fromArray, ~method_=Post, + ~xFeatureRoute=false, ) ->then(res => res->Fetch.Response.json) ->then(json => { diff --git a/src/screens/Settings/ComplianceCertificates/Compliance.res b/src/screens/Settings/ComplianceCertificates/Compliance.res index 6d932f9e9..e84518aa8 100644 --- a/src/screens/Settings/ComplianceCertificates/Compliance.res +++ b/src/screens/Settings/ComplianceCertificates/Compliance.res @@ -23,7 +23,7 @@ let make = () => { let showToast = ToastState.useShowToast() let fetchApi = AuthHooks.useApiFetcher() let (buttonState, setButtonState) = React.useState(_ => Button.Normal) - + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let downloadPDF = _ => { setButtonState(_ => Button.Loading) let currentDate = @@ -37,7 +37,7 @@ let make = () => { // For local testing this condition is added if downloadURL->LogicUtils.isNonEmptyString { open Promise - fetchApi(downloadURL, ~method_=Get) + fetchApi(downloadURL, ~method_=Get, ~xFeatureRoute) ->then(resp => { Fetch.Response.blob(resp) }) diff --git a/src/server/health.mjs b/src/server/health.mjs index e69e5ff1b..06538e2a8 100644 --- a/src/server/health.mjs +++ b/src/server/health.mjs @@ -16,9 +16,6 @@ let checkHealth = async (res) => { let indexFile = "dist/hyperswitch/index.html"; let data = Fs.readFileSync(indexFile, { encoding: "utf8" }); - if (data.includes(``)) { - output.env_config = true; - } if (data.includes(`
`)) { output.app_file = true; }