Scheduling infrastructure for absolutely everyone.
fix: move null check before metadata parse in setDefaultConferencingApp (#29457) (#29466)
Pranavvvc645c0cbf737
diff --git a/apps/api/v2/src/modules/teams/teams/teams.repository.ts b/apps/api/v2/src/modules/teams/teams/teams.repository.tsindex ad6a0b01d93..21752bce4c1 100644--- a/apps/api/v2/src/modules/teams/teams/teams.repository.ts+++ b/apps/api/v2/src/modules/teams/teams/teams.repository.ts@@ -89,12 +89,13 @@ export class TeamsRepository {async setDefaultConferencingApp(teamId: number, appSlug?: string, appLink?: string) {const team = await this.getById(teamId);- const teamMetadata = teamMetadataSchema.parse(team?.metadata);if (!team) {- throw new NotFoundException("user not found");+ throw new NotFoundException("team not found");}+ const teamMetadata = teamMetadataSchema.parse(team.metadata);+return await this.dbWrite.prisma.team.update({data: {metadata: