From 4e85698b193c4bff158d529e27d16a16e326758b Mon Sep 17 00:00:00 2001 From: Douglas Barone Date: Mon, 11 Apr 2022 12:21:05 -0400 Subject: [PATCH] Remove complete logging of devices --- server/src/lib/wifiDevices.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/server/src/lib/wifiDevices.js b/server/src/lib/wifiDevices.js index 73205e6..589c0ab 100644 --- a/server/src/lib/wifiDevices.js +++ b/server/src/lib/wifiDevices.js @@ -89,10 +89,10 @@ async function updateDB(onlineDevices) { const user = device.user ? { - connect: { - sAMAccountName: device.user.replace('IFMS\\', '').toLowerCase() - } + connect: { + sAMAccountName: device.user.replace('IFMS\\', '').toLowerCase() } + } : undefined const hostname = device.hostname || mockHostName(device) @@ -186,10 +186,10 @@ function updateDevicesInfo() { onlineDevices.length > 0 ? resolve( - `${onlineDevices.length} atualizados em ${Math.floor( - endTime - startTime - )}ms, DB em ${Math.floor(endTimeDB - startTimeDB)}ms` - ) + `${onlineDevices.length} atualizados em ${Math.floor( + endTime - startTime + )}ms, DB em ${Math.floor(endTimeDB - startTimeDB)}ms` + ) : reject('Não há dispositivos conectados no momento.') pubsub.publish(USER_PRESENCE_UPDATED, { @@ -203,8 +203,7 @@ function updateDevicesInfo() { 1000 ).toFixed(2)}s. BD em ${((endTimeDB - startTimeDB) / 1000).toFixed( 2 - )}s`, - data: onlineDevices + )}s` }) } catch (e) { logError({