From d1daf0b98cf07772faef1bd53a47bddcd5aae2f7 Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Fri, 4 Aug 2023 11:54:57 +0300 Subject: [PATCH] fix: Remove lastSeenAt when exporting FeatureEnvironment (#4416) Signed-off-by: andreas-unleash --- .../export-import-toggles/export-import-service.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/features/export-import-toggles/export-import-service.ts b/src/lib/features/export-import-toggles/export-import-service.ts index e86ed13e8815..3c8c8252aba1 100644 --- a/src/lib/features/export-import-toggles/export-import-service.ts +++ b/src/lib/features/export-import-toggles/export-import-service.ts @@ -640,11 +640,13 @@ export default class ExportImportService { ...rest, }; }), - featureEnvironments: featureEnvironments.map((item) => ({ - ...item, - name: item.featureName, - lastSeenAt: item.lastSeenAt?.toISOString(), - })), + featureEnvironments: featureEnvironments.map((item) => { + const { lastSeenAt, ...rest } = item; + return { + ...rest, + name: item.featureName, + }; + }), contextFields: filteredContextFields.map((item) => { const { createdAt, ...rest } = item; return rest;