diff --git a/server/src/utils/wifiUtils.js b/server/src/utils/wifiUtils.js index bc9c1a7..82e04c8 100644 --- a/server/src/utils/wifiUtils.js +++ b/server/src/utils/wifiUtils.js @@ -40,7 +40,7 @@ async function updateDBWithOnlineDevices() { try { await prisma.wifiDevice.upsert({ where: { mac: onlineDevice.mac }, - create: device, + create: { ...device, firstSeen: device.firstSeen || new Date() }, update: device }) } catch (e) {