From 04894c3fd18b7e98e79a945729ae066539856202 Mon Sep 17 00:00:00 2001 From: petruki <31597636+petruki@users.noreply.github.com> Date: Wed, 17 Aug 2022 18:32:25 -0700 Subject: [PATCH] Fixes #351 - Disable metrics args must contain all envs --- src/services/config.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/services/config.js b/src/services/config.js index ce17676..7fc49aa 100644 --- a/src/services/config.js +++ b/src/services/config.js @@ -108,14 +108,9 @@ export async function updateConfig(id, args, admin) { } } - // modifies metrics map toggle by environment + // validates existing environment if (args.disable_metrics) { - const updateMetrics = Object.keys(args.disable_metrics); await checkEnvironmentStatusChange_v2(args, config.domain, args.disable_metrics); - Object.keys(args.disable_metrics[updateMetrics]) - .forEach((map) => - config.disable_metrics[updateMetrics] - .set(map, args.disable_metrics[updateMetrics][map])); } // check permissions