Use same date for all entries

This commit is contained in:
Douglas Barone 2020-12-17 13:15:47 -04:00
parent 79d3bc47b9
commit b4d0f7af13

View File

@ -45,13 +45,15 @@ async function getDevices() {
export async function getOnlineWifiDevices() {
const onlineDevices = await getDevices()
const now = new Date()
const hydratedOnlineDevices = onlineDevices.map(client => ({
user: client.Name == 'unknown' ? null : client.Name,
oui: ouiFinder(client.macaddr),
mac: client.macaddr,
hostname: client.HN == 'unknown' ? undefined : client.HN,
firstSeen: undefined,
lastSeen: new Date(),
lastSeen: now,
essid: client.SSID,
ip: client.IP,
uptime: client.UT.toString(),