Fix misplacement of setting online for checkIn
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user