forked from snxraven/LinkUp-P2P-Chat
It just doesnt want to put proper data to the config for some strange reason
This commit is contained in:
parent
4a881ed721
commit
13e4020920
5
app.js
5
app.js
@ -432,8 +432,9 @@ function writeConfigToFile(filePath) {
|
|||||||
async function readConfigFromFile(filePath) {
|
async function readConfigFromFile(filePath) {
|
||||||
await fs.readFile(filePath, 'utf8', (err, data) => {
|
await fs.readFile(filePath, 'utf8', (err, data) => {
|
||||||
if(err) return console.log("Error while reading config.json! ", err);
|
if(err) return console.log("Error while reading config.json! ", err);
|
||||||
console.log(data)
|
config.userName = data.userName;
|
||||||
config = JSON.parse(data);
|
config.userAvatar = data.userAvatar;
|
||||||
|
config.rooms = data.rooms;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user