24 lines
582 B
JavaScript
24 lines
582 B
JavaScript
|
import connect from '../src/connect'
|
||
|
import del from '../src/delete'
|
||
|
import tc from '@uci/try-catch'
|
||
|
|
||
|
const SSID='zoesplace'
|
||
|
const PASSWORD='PalDgk19591960'
|
||
|
const IFACE='wlx801f029be2a2'
|
||
|
|
||
|
|
||
|
;
|
||
|
(async () => {
|
||
|
let ret = null
|
||
|
let ap = {ssid:SSID,password:PASSWORD, iface:IFACE}
|
||
|
ret = await tc(del)( {name:ap.ssid} )
|
||
|
console.log('ap',ap)
|
||
|
ret = await tc(connect)(ap)
|
||
|
if (ret.err) console.log('make error message payload to return', ret.err)
|
||
|
console.log('connect attempt response => ',ret.res)
|
||
|
|
||
|
|
||
|
})().catch(err => {
|
||
|
console.error('======Caught Error!==========\n',err)
|
||
|
})
|