From 13e402092070cb88b5e7c4d2c2fab30bb44ad124 Mon Sep 17 00:00:00 2001 From: MrMasrozYTLIVE <61359286+MrMasrozYTLIVE@users.noreply.github.com> Date: Sun, 9 Jun 2024 09:58:35 +0300 Subject: [PATCH] It just doesnt want to put proper data to the config for some strange reason --- app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 58063d1..9fc6448 100644 --- a/app.js +++ b/app.js @@ -432,8 +432,9 @@ function writeConfigToFile(filePath) { async function readConfigFromFile(filePath) { await fs.readFile(filePath, 'utf8', (err, data) => { if(err) return console.log("Error while reading config.json! ", err); - console.log(data) - config = JSON.parse(data); + config.userName = data.userName; + config.userAvatar = data.userAvatar; + config.rooms = data.rooms; }); }