From 4a564c80816748bdc690b5a39944205935aa284e Mon Sep 17 00:00:00 2001 From: Konstantin Fandelyuk Date: Fri, 6 Dec 2024 20:41:38 +0200 Subject: [PATCH] test 6 --- scripts/configs.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/configs.js b/scripts/configs.js index 9e4d3a551..23ad481f0 100644 --- a/scripts/configs.js +++ b/scripts/configs.js @@ -85,14 +85,21 @@ const getConfigForEnvironment = async (environment) => { * @param {string} [environment] - Optional, overwrite the current environment. * @returns {Promise} - The value of the configuration parameter, or undefined. */ +// 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"; // <=== This line, put any URL + +// return configElements.find((c) => c.key === configParam)?.value; +// }; + 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"; // <=== This line, put any URL - return configElements.find((c) => c.key === configParam)?.value; };