Skip to content

Commit

Permalink
Shared Workspace Id as per studio defined naming convention (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritikramuka authored Sep 18, 2023
1 parent 902ded7 commit e2504dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/web/client/utilities/commonUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,18 @@ export function isWebfileContentLoadNeeded(fileName: string, fsPath: string): bo
doesFileExist(fsPath) : false;
}


export function isPortalVersionV1(): boolean {
return WebExtensionContext.currentSchemaVersion.toLowerCase() === portalSchemaVersion.V1;
}

export function isPortalVersionV2(): boolean {
return WebExtensionContext.currentSchemaVersion.toLowerCase() === portalSchemaVersion.V2;
}

export function getWorkSpaceName(websiteId : string) : string {
if (isPortalVersionV1()) {
return `Site-v1-${websiteId}`;
} else {
return `Site-v2-${websiteId}`;
}
}

0 comments on commit e2504dd

Please sign in to comment.