mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(cloudcmd) readConfig: add formatMsg
This commit is contained in:
parent
e44486c092
commit
2c8edb698c
1 changed files with 6 additions and 2 deletions
|
|
@ -224,8 +224,9 @@
|
|||
|
||||
function readConfig(pCallBack){
|
||||
fs.readFile(CONFIG_PATH, function(pError, pData){
|
||||
var msg, status;
|
||||
if (!pError){
|
||||
Util.log('config: readed');
|
||||
status = 'ok';
|
||||
|
||||
var lStr = pData.toString(),
|
||||
lReadedConf = Util.parseJSON(lStr);
|
||||
|
|
@ -241,7 +242,10 @@
|
|||
});
|
||||
}
|
||||
else
|
||||
Util.log(pError);
|
||||
status = 'error';
|
||||
|
||||
msg = CloudFunc.formatMsg('read', 'config', status);
|
||||
Util.log(msg);
|
||||
|
||||
Util.exec(pCallBack);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue