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() {
|
export async function getOnlineWifiDevices() {
|
||||||
const onlineDevices = await getDevices()
|
const onlineDevices = await getDevices()
|
||||||
|
|
||||||
|
const now = new Date()
|
||||||
|
|
||||||
const hydratedOnlineDevices = onlineDevices.map(client => ({
|
const hydratedOnlineDevices = onlineDevices.map(client => ({
|
||||||
user: client.Name == 'unknown' ? null : client.Name,
|
user: client.Name == 'unknown' ? null : client.Name,
|
||||||
oui: ouiFinder(client.macaddr),
|
oui: ouiFinder(client.macaddr),
|
||||||
mac: client.macaddr,
|
mac: client.macaddr,
|
||||||
hostname: client.HN == 'unknown' ? undefined : client.HN,
|
hostname: client.HN == 'unknown' ? undefined : client.HN,
|
||||||
firstSeen: undefined,
|
firstSeen: undefined,
|
||||||
lastSeen: new Date(),
|
lastSeen: now,
|
||||||
essid: client.SSID,
|
essid: client.SSID,
|
||||||
ip: client.IP,
|
ip: client.IP,
|
||||||
uptime: client.UT.toString(),
|
uptime: client.UT.toString(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user