From 4c3922fb3ee3ebb7a86cc02fd5e174b2f301b004 Mon Sep 17 00:00:00 2001 From: Abrasimov Yaroslav Date: Mon, 17 Feb 2025 12:10:29 +0100 Subject: [PATCH] Rollback not required changes --- scripts/configs.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/configs.js b/scripts/configs.js index 19336ab99..66943dbd3 100644 --- a/scripts/configs.js +++ b/scripts/configs.js @@ -49,10 +49,7 @@ const getConfigForEnvironment = async (environment) => { } const parsedConfig = JSON.parse(configJSON); - if ( - !parsedConfig[':expiry'] - || parsedConfig[':expiry'] < Math.round(Date.now() / 1000) - ) { + if (!parsedConfig[':expiry'] || parsedConfig[':expiry'] < Math.round(Date.now() / 1000)) { throw new Error('Config expired'); } @@ -80,10 +77,6 @@ export const getConfigValue = async (configParam, environment) => { const env = environment || calcEnvironment(); const config = await getConfigForEnvironment(env); const configElements = config.data; - - // if (configParam === "commerce-core-endpoint") - // return "https://mcstaging.aemshop.net/graphql"; - return configElements.find((c) => c.key === configParam)?.value; };