Skip to content

Commit 29bca76

Browse files
authored
chore: Select organization fields to prevent logo import (#14255)
* chore: Select organization fields to prevent logo import * teams query actually doesn't use org, keep for backwards compat
1 parent 33d0fee commit 29bca76

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

packages/lib/server/queries/teams/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ export async function getTeamWithMembers(args: {
2525
orgSlug?: string | null;
2626
includeTeamLogo?: boolean;
2727
isTeamView?: boolean;
28-
currentOrg?: Team | null;
28+
currentOrg?: Pick<Team, "id"> | null;
2929
/**
3030
* If true, means that you are fetching an organization and not a team
3131
*/
3232
isOrgView?: boolean;
3333
}) {
34-
const { id, slug, currentOrg, userId, orgSlug, isTeamView, isOrgView, includeTeamLogo } = args;
34+
const { id, slug, currentOrg: _currentOrg, userId, orgSlug, isTeamView, isOrgView, includeTeamLogo } = args;
3535

3636
// This should improve performance saving already app data found.
3737
const appDataMap = new Map();

packages/lib/server/repository/profile.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,15 @@ export class ProfileRepository {
349349
},
350350
movedFromUser: true,
351351
organization: {
352-
include: {
352+
select: {
353+
calVideoLogo: true,
354+
id: true,
355+
logoUrl: true,
356+
name: true,
357+
slug: true,
358+
metadata: true,
359+
bannerUrl: true,
360+
isPrivate: true,
353361
organizationSettings: {
354362
select: {
355363
lockEventTypeCreationForUsers: true,

0 commit comments

Comments
 (0)