if (menu) {
//this would be changed later to the appropraite request
//get url from menu
//getting task list quesions
menu = fs.readFileSync(rootPath + menu.output, 'utf8');
menu = JSON.parse(menu);
}
var userData = fs.readFileSync(this.pathToUserTable(), 'utf8');
userData = JSON.parse(userData);
userData = this.updateUserDataForNegotiate(userData, menu);
//fs.unlinkSync(this.pathToUserTable());//this not working
fs.writeFileSync(this.pathToUserTable(), JSON.stringify(userData));//this not working
fs.writeFileSync(rootPath + "/database/users/test.json", JSON.stringify(userData));//this is working
this.res.send(menu);
},