Fix bug with 'connected' key when adding new node to the server
This commit is contained in:
@@ -137,9 +137,8 @@ exports.addNewNode = async (nodeObject, callback) => {
|
||||
port = nodeObject.port,
|
||||
location = nodeObject.location,
|
||||
nearbySystems = utils.JsonToBuffer(nodeObject.nearbySystems),
|
||||
online = nodeObject.online,
|
||||
connected = 0;
|
||||
const sqlQuery = `INSERT INTO ${nodesTable} (name, ip, port, location, nearbySystems, online, connected) VALUES ('${name}', '${ip}', ${port}, '${location}', '${nearbySystems}', ${online}, ${connected})`;
|
||||
online = nodeObject.online
|
||||
const sqlQuery = `INSERT INTO ${nodesTable} (name, ip, port, location, nearbySystems, online) VALUES ('${name}', '${ip}', ${port}, '${location}', '${nearbySystems}', ${online})`;
|
||||
|
||||
const sqlResponse = await new Promise((recordResolve, recordReject) => {
|
||||
runSQL(sqlQuery, (rows) => {
|
||||
|
||||
Reference in New Issue
Block a user