Catch all
This commit is contained in:
parent
6fff266e11
commit
259678e100
|
@ -9,19 +9,19 @@ async function getDevices() {
|
||||||
const take = 50
|
const take = 50
|
||||||
let skip = 0
|
let skip = 0
|
||||||
let currentPage = 1
|
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 {
|
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 devices = []
|
||||||
let result = []
|
let result = []
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ export async function getOnlineWifiDevices() {
|
||||||
uptime: client.UT.toString(),
|
uptime: client.UT.toString(),
|
||||||
apName: client.AP,
|
apName: client.AP,
|
||||||
status: client.ST == 'Online' ? 'ONLINE' : 'OFFLINE',
|
status: client.ST == 'Online' ? 'ONLINE' : 'OFFLINE',
|
||||||
controller: "Cisco"
|
controller: 'Cisco'
|
||||||
}))
|
}))
|
||||||
|
|
||||||
return hydratedOnlineDevices
|
return hydratedOnlineDevices
|
||||||
|
|
Loading…
Reference in New Issue
Block a user