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
This commit is contained in:
Alex van Andel
2024-03-28 12:54:45 -03:00
committed by GitHub
parent 33d0fee43e
commit 29bca76e91
2 changed files with 11 additions and 3 deletions
+2 -2
View File
@@ -25,13 +25,13 @@ export async function getTeamWithMembers(args: {
orgSlug?: string | null;
includeTeamLogo?: boolean;
isTeamView?: boolean;
currentOrg?: Team | null;
currentOrg?: Pick<Team, "id"> | null;
/**
* If true, means that you are fetching an organization and not a team
*/
isOrgView?: boolean;
}) {
const { id, slug, currentOrg, userId, orgSlug, isTeamView, isOrgView, includeTeamLogo } = args;
const { id, slug, currentOrg: _currentOrg, userId, orgSlug, isTeamView, isOrgView, includeTeamLogo } = args;
// This should improve performance saving already app data found.
const appDataMap = new Map();
+9 -1
View File
@@ -349,7 +349,15 @@ export class ProfileRepository {
},
movedFromUser: true,
organization: {
include: {
select: {
calVideoLogo: true,
id: true,
logoUrl: true,
name: true,
slug: true,
metadata: true,
bannerUrl: true,
isPrivate: true,
organizationSettings: {
select: {
lockEventTypeCreationForUsers: true,