const secret = process.env.RECAPTCHA_SECRET_KEY;
export const verifyRecaptcha = async (token: string) => {
  const response = await fetch(`https://www.google.com/recaptcha/api/siteverify?secret=${secret}&response=${token}`, {
    method: 'POST',
    body: JSON.stringify({ secret: secret, response: token }),
  });
  const data = await response.json();
  return data.success;
};
