Catch all
This commit is contained in:
parent
6fff266e11
commit
259678e100
|
@ -10,18 +10,18 @@ async function getDevices() {
|
|||
let skip = 0
|
||||
let currentPage = 1
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
ignoreHTTPSErrors: true
|
||||
})
|
||||
|
||||
const controllerPage = await browser.newPage()
|
||||
|
||||
await controllerPage.authenticate({
|
||||
username: auth.username,
|
||||
password: auth.password
|
||||
})
|
||||
|
||||
try {
|
||||
const browser = await puppeteer.launch({
|
||||
ignoreHTTPSErrors: true
|
||||
})
|
||||
|
||||
const controllerPage = await browser.newPage()
|
||||
|
||||
await controllerPage.authenticate({
|
||||
username: auth.username,
|
||||
password: auth.password
|
||||
})
|
||||
|
||||
let devices = []
|
||||
let result = []
|
||||
|
||||
|
@ -62,7 +62,7 @@ export async function getOnlineWifiDevices() {
|
|||
uptime: client.UT.toString(),
|
||||
apName: client.AP,
|
||||
status: client.ST == 'Online' ? 'ONLINE' : 'OFFLINE',
|
||||
controller: "Cisco"
|
||||
controller: 'Cisco'
|
||||
}))
|
||||
|
||||
return hydratedOnlineDevices
|
||||
|
|
Loading…
Reference in New Issue
Block a user