Skip to content

Commit

Permalink
Rollback not required changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferri0 committed Feb 17, 2025
1 parent 79277d6 commit 4c3922f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions scripts/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down Expand Up @@ -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;
};

Expand Down

0 comments on commit 4c3922f

Please sign in to comment.