import { NextRequest, NextResponse } from "next/server";

export async function PUT(req: NextRequest) {

    const body = await req.json();

    const token =
        req.headers.get("authorization");

    const response = await fetch(
        "https://api.astrology.togwe.com/api/user/update-profile",
        {
            method: "PUT",

            headers: {
                "Content-Type": "application/json",
                Authorization: token || "",
            },

            body: JSON.stringify(body),
        }
    );

    const data = await response.json();

    return NextResponse.json(data);
}