* 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>
19 lines
572 B
TypeScript
19 lines
572 B
TypeScript
import { WorkflowRepository } from "@calcom/lib/server/repository/workflow";
|
|
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
|
|
|
import type { TGetVerifiedNumbersInputSchema } from "./getVerifiedNumbers.schema";
|
|
|
|
type GetVerifiedNumbersOptions = {
|
|
ctx: {
|
|
user: NonNullable<TrpcSessionUser>;
|
|
};
|
|
input: TGetVerifiedNumbersInputSchema;
|
|
};
|
|
|
|
export const getVerifiedNumbersHandler = async ({ ctx, input }: GetVerifiedNumbersOptions) => {
|
|
return await WorkflowRepository.getVerifiedNumbers({
|
|
userId: ctx.user.id,
|
|
teamId: input.teamId,
|
|
});
|
|
};
|