Fix bug Tunnel

This commit is contained in:
decolua committed 2026-02-22 21:44:11 +07:00
1 parent a5eb5a864e
commit d21f7aaadc
9 files changed
+734 -237

No files matched your search

@@ -62,7 +62,12 @@ export async function GET(request, { params }) {
export async function POST(request, { params }) {
try {
const { provider, action } = await params;
const body = await request.json();
let body;
try {
body = await request.json();
} catch {
return NextResponse.json({ error: "Invalid or empty request body" }, { status: 400 });
}
if (action === "exchange") {
const { code, redirectUri, codeVerifier, state } = body;