import { verifyOnboardingOtp } from '@/modules/onboarding/services/onboarding.service';
import type { AppContext } from '@/types/hono';
import type { OnboardingVerifyOtpInput } from '@repo/api-contract';

export async function verifyOtpHandler(c: AppContext) {
  const payload = c.req.valid('json' as never) as OnboardingVerifyOtpInput;
  const result = await verifyOnboardingOtp(payload);

  return c.json(result);
}
