mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(edit) authCheck
This commit is contained in:
parent
3c18636e23
commit
a5818e43b5
1 changed files with 7 additions and 7 deletions
|
|
@ -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!');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue