From 01e76cbb1c1e5c7cf4351fc9dbdb8ebb0a95fe14 Mon Sep 17 00:00:00 2001 From: nai-degen Date: Sun, 17 Dec 2023 00:25:58 -0600 Subject: [PATCH] restores accidentally deleted line breaking infopage stats --- src/service-info.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/service-info.ts b/src/service-info.ts index add8a9d..501737d 100644 --- a/src/service-info.ts +++ b/src/service-info.ts @@ -153,6 +153,7 @@ export function buildInfo(baseUrl: string, forAdmin = false): ServiceInfo { .concat("turbo") ); + modelStats.clear(); serviceStats.clear(); keys.forEach(addKeyToAggregates); @@ -385,10 +386,11 @@ function getInfoForFamily(family: ModelFamily): BaseFamilyInfo { break; case "aws": const logged = modelStats.get(`${family}__awsLogged`) || 0; - const logMsg = config.allowAwsLogging - ? `${logged} active keys are potentially logged.` - : `${logged} active keys are potentially logged and can't be used. Set ALLOW_AWS_LOGGING=true to override.`; - info.privacy = logMsg; + if (logged > 0) { + info.privacy = config.allowAwsLogging + ? `${logged} active keys are potentially logged.` + : `${logged} active keys are potentially logged and can't be used. Set ALLOW_AWS_LOGGING=true to override.`; + } break; } }