import { resendPasswordResetOtp } from '@/modules/password-reset/services/password-reset.service';
import type { AppContext } from '@/types/hono';
import type { PasswordResetResendInput } from '@repo/api-contract';

export async function resendPasswordResetHandler(c: AppContext) {
  const payload = c.req.valid('json' as never) as PasswordResetResendInput;

  const result = await resendPasswordResetOtp(payload);
  return c.json(result, 202);
}
