21 lines
488 B
JavaScript
21 lines
488 B
JavaScript
|
store.commit('setEvent', {
|
||
|
subject:"wifictld_pkg",
|
||
|
callback: (state, msg) => {
|
||
|
|
||
|
// add to ap list
|
||
|
const ip = msg.body.ip;
|
||
|
if(state.controller._ap[ip] === undefined){
|
||
|
state.controller.ap.push(ip)
|
||
|
state.controller._ap[ip] = null;
|
||
|
}
|
||
|
|
||
|
// add clients
|
||
|
const client = msg.body.msg.client;
|
||
|
if (state.controller.clients[client.addr] === undefined) {
|
||
|
state.controller._clients.push(client.addr)
|
||
|
}
|
||
|
client.ap = ip;
|
||
|
state.controller.clients[client.addr] = client;
|
||
|
}
|
||
|
})
|