Files
calendar/packages/trpc/server/routers/viewer/apps/integrations.handler.ts
T
30dce7bacd perf: Move apps procedures off of loggedInViewer (#20112)
* perf: Slim down loggedInViewer tRPC router

* Fixed trpc client calls for new routes

* Moved bookingUnconfirmedCount

* Moved getUserTopBanners to me router

* Moved shouldVerifyEmail to me router

* Moved i18n from public to its own router

* fix ssrInit

* fix ssrInit usage

* fix type check

* better naming

* fix

* fix

* Fix types

* Removed used of importHandler

* perf: Move apps procedures off of loggedInViewer

* Moved 2 more apps-related procedures

---------

Co-authored-by: hbjORbj <sldisek783@gmail.com>
2025-03-17 17:18:19 +00:00

18 lines
530 B
TypeScript

import { getConnectedApps } from "@calcom/lib/getConnectedApps";
import { prisma } from "@calcom/prisma";
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
import type { TIntegrationsInputSchema } from "./integrations.schema";
type IntegrationsOptions = {
ctx: {
user: NonNullable<TrpcSessionUser>;
};
input: TIntegrationsInputSchema;
};
export const integrationsHandler = async ({ ctx, input }: IntegrationsOptions) => {
const user = ctx.user;
return getConnectedApps({ user, input, prisma });
};