From 312e3a4fd4467ecfc2085bb265665206d184fc9b Mon Sep 17 00:00:00 2001 From: isra el Date: Thu, 29 Jan 2026 19:16:25 +0300 Subject: [PATCH] chore(api): remove unnecessary fields from heartbeat data --- api/src/gateway/gateway.service.ts | 32 ------------------------------ 1 file changed, 32 deletions(-) diff --git a/api/src/gateway/gateway.service.ts b/api/src/gateway/gateway.service.ts index 2aa11b9..a34480e 100644 --- a/api/src/gateway/gateway.service.ts +++ b/api/src/gateway/gateway.service.ts @@ -1118,38 +1118,6 @@ const updatedSms = await this.smsModel.findByIdAndUpdate( updateData['deviceUptimeInfo.lastUpdated'] = now } - // Update memoryInfo if any memory field provided - if ( - input.memoryFreeBytes !== undefined || - input.memoryTotalBytes !== undefined || - input.memoryMaxBytes !== undefined - ) { - if (input.memoryFreeBytes !== undefined) { - updateData['memoryInfo.freeBytes'] = input.memoryFreeBytes - } - if (input.memoryTotalBytes !== undefined) { - updateData['memoryInfo.totalBytes'] = input.memoryTotalBytes - } - if (input.memoryMaxBytes !== undefined) { - updateData['memoryInfo.maxBytes'] = input.memoryMaxBytes - } - updateData['memoryInfo.lastUpdated'] = now - } - - // Update storageInfo if any storage field provided - if ( - input.storageAvailableBytes !== undefined || - input.storageTotalBytes !== undefined - ) { - if (input.storageAvailableBytes !== undefined) { - updateData['storageInfo.availableBytes'] = input.storageAvailableBytes - } - if (input.storageTotalBytes !== undefined) { - updateData['storageInfo.totalBytes'] = input.storageTotalBytes - } - updateData['storageInfo.lastUpdated'] = now - } - // Update systemInfo if timezone or locale provided if (input.timezone !== undefined || input.locale !== undefined) { if (input.timezone !== undefined) {