default channel on create node + send callback
This commit is contained in:
parent
63f77d87c7
commit
485ecc13c6
|
@ -5,6 +5,8 @@ export default {
|
|||
'title': 'FreifunkManager - Breminale',
|
||||
'backend': `ws${location.protocol == 'https:' ? 's' : ''}://${location.host}/ws`,
|
||||
'node': {
|
||||
'channel24': 6,
|
||||
'channel5': 44,
|
||||
// Minuten till is shown as offline
|
||||
'offline': 5
|
||||
},
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import config from './config';
|
||||
|
||||
const current = {},
|
||||
list = {};
|
||||
|
||||
|
@ -22,7 +24,10 @@ export function getNode (nodeid) {
|
|||
export function createNode (nodeid) {
|
||||
return {
|
||||
'node_id': nodeid,
|
||||
'wireless': {},
|
||||
'wireless': {
|
||||
'channel24': config.node.channel24,
|
||||
'channel5': config.node.channel5,
|
||||
},
|
||||
'location': {}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -27,8 +27,7 @@ func (ws *WebsocketServer) nodeHandler(logger *log.Entry, msg *wsLib.Message) er
|
|||
logger.Debugf("%v", node)
|
||||
return nil
|
||||
}
|
||||
ws.nodes.UpdateNode(&node)
|
||||
msg.Answer(msg.Subject, true)
|
||||
msg.Answer(msg.Subject, ws.nodes.UpdateNode(&node))
|
||||
logger.Infof("change %s", node.NodeID)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue