export async function POST(req: NextRequest) {
// req.headers.set("Access-Control-Allow-Origin", "http://localhost:3000/")
req.headers.set("Access-Control-Allow-Origin", "*")
req.headers.set("Access-Control-Allow-Methods", "*")
cors({ origin: "*" })
const { env, userId, secretKey } = await req.json()
if (!userId) {
return NextResponse.json({ error: "userId is missing" }, { status: 400, headers: corsHeaders })
}
export async function POST(req: NextRequest) {
// req.headers.set("Access-Control-Allow-Origin", "http://localhost:3000/")
req.headers.set("Access-Control-Allow-Origin", "*")
req.headers.set("Access-Control-Allow-Methods", "*")
cors({ origin: "*" })
const { env, userId, secretKey } = await req.json()
if (!userId) {
return NextResponse.json({ error: "userId is missing" }, { status: 400, headers: corsHeaders })
}