refactor(edit) authCheck

This commit is contained in:
coderaiser 2016-12-26 12:12:08 +02:00
parent 3c18636e23
commit a5818e43b5

View file

@ -131,13 +131,13 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, Format;
if (error)
return Dialog.alert(TITLE, error);
if (config.auth) {
spawn.emit('auth', config.username, config.password);
spawn.on('reject', function() {
Dialog.alert(TITLE, 'Wrong credentials!');
});
}
if (!config.auth)
return;
spawn.emit('auth', config.username, config.password);
spawn.on('reject', function() {
Dialog.alert(TITLE, 'Wrong credentials!');
});
});
}