From f8caf08ccf6ef5ffa3686c30292a162f23c048ca Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Sat, 23 Sep 2023 16:46:15 +0700 Subject: [PATCH] fix: typecheck warnings --- packages/app-store/_components/AppCard.tsx | 2 +- packages/lib/payment/handlePaymentSuccess.ts | 3 ++- .../trpc/server/routers/loggedInViewer/integrations.handler.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/app-store/_components/AppCard.tsx b/packages/app-store/_components/AppCard.tsx index 22953dacdf..f2449cdd5e 100644 --- a/packages/app-store/_components/AppCard.tsx +++ b/packages/app-store/_components/AppCard.tsx @@ -125,7 +125,7 @@ export default function AppCard({

This app has not been setup yet

- +
) diff --git a/packages/lib/payment/handlePaymentSuccess.ts b/packages/lib/payment/handlePaymentSuccess.ts index c1208ee54a..334cea86fc 100644 --- a/packages/lib/payment/handlePaymentSuccess.ts +++ b/packages/lib/payment/handlePaymentSuccess.ts @@ -9,6 +9,7 @@ import { HttpError as HttpCode } from "@calcom/lib/http-error"; import { getTranslation } from "@calcom/lib/server/i18n"; import prisma, { bookingMinimalSelect } from "@calcom/prisma"; import { BookingStatus } from "@calcom/prisma/enums"; +import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential"; import type { CalendarEvent } from "@calcom/types/Calendar"; import { getTimeFormatStringFromUserTimeFormat } from "../timeFormat"; @@ -34,7 +35,7 @@ export async function handlePaymentSuccess(paymentId: number, bookingId: number) select: { id: true, username: true, - credentials: true, + credentials: { select: credentialForCalendarServiceSelect }, timeZone: true, timeFormat: true, email: true, diff --git a/packages/trpc/server/routers/loggedInViewer/integrations.handler.ts b/packages/trpc/server/routers/loggedInViewer/integrations.handler.ts index 60d40953ea..a5baa1e480 100644 --- a/packages/trpc/server/routers/loggedInViewer/integrations.handler.ts +++ b/packages/trpc/server/routers/loggedInViewer/integrations.handler.ts @@ -170,7 +170,7 @@ export const integrationsHandler = async ({ ctx, input }: IntegrationsOptions) = teams, isInstalled: !!userCredentialIds.length || !!teams.length || app.isGlobal, // FIXME: remove hardcoding and add per-app validation - isSetup: !!credential?.key?.account_id || app.slug !== "alby", + isSetup: !!(credential?.key as { account_id: string })?.account_id || app.slug !== "alby", }; } );