Skip to content

Commit ae50be9

Browse files
Removes organization ids from checkin/subscription
1 parent f8a5d5a commit ae50be9

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

src/plus/gk/account/subscription.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export interface SubscriptionAccount {
4343
readonly email: string | undefined;
4444
readonly verified: boolean;
4545
readonly createdOn: string;
46-
readonly organizationIds: string[];
4746
}
4847

4948
export interface SubscriptionPreviewTrial {

src/plus/gk/checkin.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export interface GKCheckInResponse {
77
readonly paidLicenses: Record<GKLicenseType, GKLicense>;
88
readonly effectiveLicenses: Record<GKLicenseType, GKLicense>;
99
};
10-
readonly orgIds?: string[];
1110
}
1211

1312
export interface GKUser {
@@ -51,7 +50,6 @@ export function getSubscriptionFromCheckIn(data: GKCheckInResponse): Partial<Sub
5150
email: data.user.email,
5251
verified: data.user.status === 'activated',
5352
createdOn: data.user.createdDate,
54-
organizationIds: data.orgIds ?? [],
5553
};
5654

5755
const effectiveLicenses = Object.entries(data.licenses.effectiveLicenses) as [GKLicenseType, GKLicense][];

src/plus/workspaces/workspacesApi.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -164,25 +164,11 @@ export class WorkspacesApi {
164164
}
165165
queryParams += ')';
166166

167-
let query = 'query getWorkpaces {';
168-
query += `memberProjects: projects ${queryParams} { ${queryData} }`;
169-
170-
// TODO@axosoft-ramint This is a temporary and hacky workaround until projects api returns all projects the
171-
// user belongs to in one query. Update once that is available.
172-
if (options?.cursor == null && options?.includeOrganizations) {
173-
const organizationIds =
174-
(await this.container.subscription.getSubscription())?.account?.organizationIds ?? [];
175-
for (const organizationId of organizationIds) {
176-
let orgQueryParams = `(first: ${options?.count ?? defaultWorkspaceCount}`;
177-
if (options?.page) {
178-
orgQueryParams += `, page: ${options.page}`;
179-
}
180-
orgQueryParams += `, organization_id: "${organizationId}")`;
181-
query += `organizationProjects_${organizationId}: projects ${orgQueryParams} { ${queryData} }`;
167+
const query = `
168+
query getWorkpaces {
169+
memberProjects: projects ${queryParams} { ${queryData} }
182170
}
183-
}
184-
185-
query += '}';
171+
`;
186172

187173
const rsp = await this.fetch({ query: query });
188174

0 commit comments

Comments
 (0)