fix: remove cal video logo from select (#17665)

* fix: remove cal video logo from managed event types

* fix: do not fetch cal video logo
This commit is contained in:
Udit Takkar authored and GitHub committed 2024-11-15 16:45:44 +00:00
1 parent f76696032e
commit 9b79c037c2
7 files changed
+23 -17

No files matched your search

@@ -44,7 +44,6 @@ const userSelect = Prisma.validator<Prisma.UserSelect>()({
id: true,
name: true,
slug: true,
calVideoLogo: true,
bannerUrl: true,
},
},
@@ -298,4 +298,17 @@ export class OrganizationRepository {
}
return { ...org, metadata: parsedMetadata };
}
static async findCalVideoLogoByOrgId({ id }: { id: number }) {
const org = await prisma.team.findUnique({
where: {
id,
},
select: {
calVideoLogo: true,
},
});
return org?.calVideoLogo;
}
}
@@ -42,7 +42,6 @@ const organizationSelect = {
name: true,
metadata: true,
logoUrl: true,
calVideoLogo: true,
bannerUrl: true,
isPlatform: true,
};
@@ -363,7 +362,6 @@ export class ProfileRepository {
},
organization: {
select: {
calVideoLogo: true,
id: true,
logoUrl: true,
name: true,
+1 -1
View File
@@ -465,7 +465,7 @@ export class UserRepository {
organization?: {
id: number;
name: string;
calVideoLogo: string | null;
calVideoLogo?: string | null;
bannerUrl: string | null;
slug: string | null;
metadata: Prisma.JsonValue;
@@ -207,16 +207,6 @@ const filterEventTypes = async (
evType.hosts = [];
});
// Remove calVideoLogo from organization objects
filteredEventTypes.forEach((eventType) => {
eventType.users?.forEach((user) => {
if (user.profile?.organization) {
const { calVideoLogo, ...orgWithoutCalVideoLogo } = user.profile.organization;
user.profile.organization = orgWithoutCalVideoLogo;
}
});
});
log.info(
"filteredEventTypes",
safeStringify({