14 lines
570 B
TypeScript
14 lines
570 B
TypeScript
import { handleResult } from '@/lib/http/handle-result';
|
|
import type { AppContext } from '@/types/hono';
|
|
import { z } from 'zod';
|
|
import { resendComplexInvitation } from './resend-complex-invitation.business';
|
|
|
|
const resendInvitationParamsSchema = z.object({ id: z.uuid(), invitationId: z.uuid() });
|
|
|
|
export async function resendComplexInvitationHandler(c: AppContext) {
|
|
const user = c.get('user');
|
|
const params = resendInvitationParamsSchema.parse(c.req.param());
|
|
|
|
return handleResult(c, await resendComplexInvitation(user.id, params.id, params.invitationId));
|
|
}
|