|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { Settings } from '../../../models/server/raw'; |
|
|
|
import { Settings } from '../../../models/server/raw'; |
|
|
|
|
|
|
|
import { callbacks } from '../../../callbacks'; |
|
|
|
|
|
|
|
|
|
|
|
export function saveRegistrationData({ |
|
|
|
export function saveRegistrationData({ |
|
|
|
workspaceId, |
|
|
|
workspaceId, |
|
|
|
@ -8,6 +9,7 @@ export function saveRegistrationData({ |
|
|
|
client_secret_expires_at, |
|
|
|
client_secret_expires_at, |
|
|
|
publicKey, |
|
|
|
publicKey, |
|
|
|
registration_client_uri, |
|
|
|
registration_client_uri, |
|
|
|
|
|
|
|
licenseData, |
|
|
|
}) { |
|
|
|
}) { |
|
|
|
return Promise.all([ |
|
|
|
return Promise.all([ |
|
|
|
Settings.updateValueById('Register_Server', true), |
|
|
|
Settings.updateValueById('Register_Server', true), |
|
|
|
@ -18,5 +20,9 @@ export function saveRegistrationData({ |
|
|
|
Settings.updateValueById('Cloud_Workspace_Client_Secret_Expires_At', client_secret_expires_at), |
|
|
|
Settings.updateValueById('Cloud_Workspace_Client_Secret_Expires_At', client_secret_expires_at), |
|
|
|
Settings.updateValueById('Cloud_Workspace_PublicKey', publicKey), |
|
|
|
Settings.updateValueById('Cloud_Workspace_PublicKey', publicKey), |
|
|
|
Settings.updateValueById('Cloud_Workspace_Registration_Client_Uri', registration_client_uri), |
|
|
|
Settings.updateValueById('Cloud_Workspace_Registration_Client_Uri', registration_client_uri), |
|
|
|
]); |
|
|
|
Settings.updateValueById('Cloud_Workspace_License', licenseData.license || ''), |
|
|
|
|
|
|
|
]).then((...results) => { |
|
|
|
|
|
|
|
callbacks.run('workspaceLicenseChanged', licenseData.license); |
|
|
|
|
|
|
|
return results; |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|