import { NextResponse } from "next/server";

export async function POST(request: Request) {
  try {

    const body = await request.json();

    const apiResponse = await fetch(
      "https://api.astrology.togwe.com/api/user/resend-otp",
      {
        method: "POST",
        headers: {
          "Content-Type":"application/json",
        },
        body: JSON.stringify(body),
      }
    );

    const data = await apiResponse.json();

    return NextResponse.json(data);

  } catch {

    return NextResponse.json(
      {
        success:false,
        message:"Something went wrong"
      },
      {
        status:500
      }
    );

  }
}