diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/www/script/futon.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/share/www/script/futon.js b/share/www/script/futon.js index 7401b4cc..57a9aceb 100644 --- a/share/www/script/futon.js +++ b/share/www/script/futon.js @@ -69,9 +69,15 @@ if (!validateUsernameAndPassword(data, callback)) return; $.couch.config({ success : function() { - callback(); - doLogin(data.name, data.password, callback); - doSignup(data.name, null, callback, false); + doLogin(data.name, data.password, function(errors) { + if(!$.isEmptyObject(errors)) { + callback(errors); + return; + } + doSignup(data.name, null, function(errors) { + callback(errors); + }, false); + }); } }, "admins", data.name, data.password); } |