Fix misplacement of setting online for checkIn

This commit is contained in:
Logan Cusano
2023-06-19 02:34:29 -04:00
parent ea2dbd9fb0
commit 47d18c494d

View File

@@ -100,10 +100,10 @@ exports.checkConfig = async function checkConfig() {
exports.checkIn = async () => {
let reqOptions;
await this.checkConfig();
runningClientConfig.online = true;
// Check if there is an ID found, if not add the node to the server. If there was an ID, check in with the server to make sure it has the correct information
try {
if (!runningClientConfig?.id || runningClientConfig.id == 0) {
runningClientConfig.online = true;
try {
if (!runningClientConfig?.id || runningClientConfig.id == 0) {
// ID was not found in the config, creating a new node
reqOptions = new requestOptions("/nodes/newNode", "POST");
sendHttpRequest(reqOptions, JSON.stringify(runningClientConfig), async (responseObject) => {