Index: remoting/webapp/crd/js/host_list_api_impl.js |
diff --git a/remoting/webapp/crd/js/host_list_api_impl.js b/remoting/webapp/crd/js/host_list_api_impl.js |
index 542e3f0e9d68e3f9ef8cd10101963cd644d444d2..650ec884b21bb44244efd3167c6d8d5dc5842b4f 100644 |
--- a/remoting/webapp/crd/js/host_list_api_impl.js |
+++ b/remoting/webapp/crd/js/host_list_api_impl.js |
@@ -42,11 +42,11 @@ remoting.HostListApiImpl.prototype.register = function( |
}).start().then(function(response) { |
if (response.status == 200) { |
var result = response.getJson(); |
+ var authCode = ''; |
if (result['data']) { |
- return base.getStringAttr(result['data'], 'authorizationCode', ''); |
- } else { |
- return ''; |
+ authCode = base.getStringAttr(result['data'], 'authorizationCode', ''); |
} |
+ return { authCode: authCode, email: '' }; |
} else { |
console.log( |
'Failed to register the host. Status: ' + response.status + |