* fix trpc session circle dep * fixes trpc session cirlce dep * fix relative imports * fix more imports to use types and not trpc * fix exports * Fixed types --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com>
15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
import { userMetadata } from "@calcom/prisma/zod-utils";
|
|
import type { TrpcSessionUser } from "@calcom/trpc/server/types";
|
|
|
|
type GetUsersDefaultConferencingAppOptions = {
|
|
ctx: {
|
|
user: NonNullable<TrpcSessionUser>;
|
|
};
|
|
};
|
|
|
|
export const getUsersDefaultConferencingAppHandler = async ({
|
|
ctx,
|
|
}: GetUsersDefaultConferencingAppOptions) => {
|
|
return userMetadata.parse(ctx.user.metadata)?.defaultConferencingApp;
|
|
};
|