Removing the static ENV var for nearby systems

This commit is contained in:
Logan Cusano
2023-05-21 15:22:43 -04:00
parent c882fb63d3
commit 7512c8e1df
3 changed files with 2 additions and 19 deletions

View File

@@ -19,7 +19,6 @@ CLIENT_NAME=""
CLIENT_IP=""
CLIENT_PORT=3010
CLIENT_LOCATION=""
CLIENT_NEARBY_SYSTEMS=""
CLIENT_ONLINE=true
# Configuration for the connection to the server

View File

@@ -1,16 +0,0 @@
// Core config settings for the node, these are the settings that are checked with the server
exports.nodeConfig = {
"id": 0,
"name": "",
"ip": "",
"port": 0,
"location": "",
"nearbySystems": {
"System Name": {
"frequencies": [],
"mode": "",
"trunkFile": ""
}
},
"online": false
}

View File

@@ -8,10 +8,10 @@ const modes = require("../config/modes");
const { executeAsyncConsoleCommand, nodeObject } = require("../utilities/utilities");
// Utilities
const { updateId, updateConfig } = require("../utilities/updateConfig");
const {updatePreset, addNewPreset, getPresets, removePreset} = require("../utilities/updatePresets");
const { updatePreset, addNewPreset, getPresets, removePreset } = require("../utilities/updatePresets");
const { onHttpError, requestOptions, sendHttpRequest } = require("../utilities/httpRequests");
var runningClientConfig = new nodeObject({_id: process.env.CLIENT_ID, _ip: process.env.CLIENT_IP, _name: process.env.CLIENT_NAME, _port: process.env.CLIENT_PORT, _location: process.env.CLIENT_LOCATION, _nearbySystems: process.env.CLIENT_NEARBY_SYSTEMS, _online: process.env.CLIENT_ONLINE});
var runningClientConfig = new nodeObject({_id: process.env.CLIENT_ID, _ip: process.env.CLIENT_IP, _name: process.env.CLIENT_NAME, _port: process.env.CLIENT_PORT, _location: process.env.CLIENT_LOCATION, _nearbySystems: getPresets(), _online: process.env.CLIENT_ONLINE});
/**
* Check the body for the required fields to update or add a preset