Files
sign/packages/trpc/server/team-router/resend-team-email-verification-route.ts

27 lines
741 B
TypeScript
Raw Normal View History

2024-12-30 21:01:03 +11:00
import { z } from 'zod';
import { resendTeamEmailVerification } from '@documenso/lib/server-only/team/resend-team-email-verification';
import { authenticatedProcedure } from '../trpc';
export const ZResendTeamEmailVerificationRequestSchema = z.object({
teamId: z.number(),
});
export const resendTeamEmailVerificationRoute = authenticatedProcedure
// .meta({
// openapi: {
// method: 'POST',
// path: '/team/{teamId}/email/resend',
// summary: 'Resend team email verification',
// tags: ['Teams'],
// },
// })
.input(ZResendTeamEmailVerificationRequestSchema)
.mutation(async ({ input, ctx }) => {
await resendTeamEmailVerification({
userId: ctx.user.id,
...input,
});
});