Skip to content

Commit

Permalink
remove reconnectCheck from syncWorkspace
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Sep 13, 2023
1 parent 952fcde commit f19b6b6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function disconnectWorkspace() {

await Settings.updateValueById('Register_Server', false);

await syncWorkspace(true);
await syncWorkspace();

return true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function reconnectWorkspace() {

await Settings.updateValueById('Register_Server', true);

await syncWorkspace(true);
await syncWorkspace();

return true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function retrieveRegistrationStatus(): Promise<{
email: string;
}> {
const info = {
connectToCloud: settings.get<boolean>('Register_Server'),
connectToCloud: true || settings.get<boolean>('Register_Server'),
workspaceRegistered: !!settings.get('Cloud_Workspace_Client_Id') && !!settings.get('Cloud_Workspace_Client_Secret'),
workspaceId: settings.get<string>('Cloud_Workspace_Id'),
uniqueId: settings.get<string>('uniqueID'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { syncWorkspace } from './syncWorkspace';
export async function startRegisterWorkspace(resend = false) {
const { workspaceRegistered, connectToCloud } = await retrieveRegistrationStatus();
if ((workspaceRegistered && connectToCloud) || process.env.TEST_MODE) {
await syncWorkspace(true);
await syncWorkspace();

return true;
}
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/app/cloud/server/functions/syncWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { getWorkspaceLicense } from './getWorkspaceLicense';
import { retrieveRegistrationStatus } from './retrieveRegistrationStatus';
import { getCachedSupportedVersionsToken } from './supportedVersionsToken/supportedVersionsToken';

export async function syncWorkspace(reconnectCheck = false) {
export async function syncWorkspace() {
const { workspaceRegistered, connectToCloud } = await retrieveRegistrationStatus();
if (!workspaceRegistered || (!connectToCloud && !reconnectCheck)) {
if (!workspaceRegistered || !connectToCloud) {
return false;
}

Expand Down

0 comments on commit f19b6b6

Please sign in to comment.