fix search params

This commit is contained in:
Max Peintner
2023-05-19 10:13:05 +02:00
parent 99f66af644
commit d08abbfaa9
8 changed files with 37 additions and 19 deletions

View File

@@ -0,0 +1,15 @@
import { server, verifyEmail } from "#/lib/zitadel";
import { NextRequest, NextResponse } from "next/server";
export async function POST(request: NextRequest) {
const body = await request.json();
if (body) {
const { userId, code } = body;
return verifyEmail(server, userId, code).then((resp) => {
return NextResponse.json(resp);
});
} else {
return NextResponse.error();
}
}