chore(cloudcmd) readConfig

This commit is contained in:
coderaiser 2014-02-19 06:45:31 -05:00
parent 9ad14967e7
commit 4180e160ba

View file

@ -176,20 +176,19 @@
function readConfig(callback) {
fs.readFile(CONFIG_PATH, 'utf8', function(error, data) {
var msg, status, readed;
var status, json, msg;
if (error)
status = 'error';
status = 'error';
else {
status = 'ok';
readed = Util.parseJSON(data);
main.config = Config = readed;
status = 'ok';
json = Util.parseJSON(data);
main.config = Config = json;
}
msg = CloudFunc.formatMsg('read', 'config', status);
Util.log(msg);
msg = CloudFunc.formatMsg('read', 'config', status);
Util.log(msg);
Util.exec(callback);
});
}