* wip * complete server side fetching for app router * fix type error * fix * address comments --------- Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
20 lines
596 B
TypeScript
20 lines
596 B
TypeScript
import { WorkflowRepository } from "@calcom/lib/server/repository/workflow";
|
|
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
|
|
|
import type { TGetVerifiedEmailsInputSchema } from "./getVerifiedEmails.schema";
|
|
|
|
type GetVerifiedEmailsOptions = {
|
|
ctx: {
|
|
user: NonNullable<TrpcSessionUser>;
|
|
};
|
|
input: TGetVerifiedEmailsInputSchema;
|
|
};
|
|
|
|
export const getVerifiedEmailsHandler = async ({ ctx, input }: GetVerifiedEmailsOptions) => {
|
|
return await WorkflowRepository.getVerifiedEmails({
|
|
userId: ctx.user.id,
|
|
userEmail: ctx.user.email,
|
|
teamId: input.teamId,
|
|
});
|
|
};
|