mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-14 13:04:22 +00:00
fix search params
This commit is contained in:
15
apps/login/app/verifyemail/route.ts
Normal file
15
apps/login/app/verifyemail/route.ts
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user