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 edea31893447f7fec57f955d9cbddbd90ec93a37..2a5a19f47ddc71535ed844ba3e84d8ef1f5a4d64 100644 |
--- a/remoting/webapp/crd/js/host_list_api_impl.js |
+++ b/remoting/webapp/crd/js/host_list_api_impl.js |
@@ -23,7 +23,8 @@ remoting.HostListApiImpl = function() { |
/** @override */ |
remoting.HostListApiImpl.prototype.register = function( |
- newHostId, hostName, publicKey, hostClientId) { |
+ hostName, publicKey, hostClientId) { |
+ var newHostId = base.generateUuid(); |
var newHostDetails = { data: { |
hostId: newHostId, |
hostName: hostName, |
@@ -44,7 +45,12 @@ remoting.HostListApiImpl.prototype.register = function( |
var result = /** @type {!Object} */ (response.getJson()); |
var data = base.getObjectAttr(result, 'data'); |
var authCode = base.getStringAttr(data, 'authorizationCode'); |
- return { authCode: authCode, email: '', gcdId: '' }; |
+ return { |
+ authCode: authCode, |
+ email: '', |
+ hostId: newHostId, |
+ isLegacy: true |
+ }; |
} else { |
console.log( |
'Failed to register the host. Status: ' + response.status + |