Use same date for all entries
This commit is contained in:
parent
79d3bc47b9
commit
b4d0f7af13
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user