fix build

This commit is contained in:
Max Peintner
2024-12-27 15:06:01 +01:00
parent a6c1016202
commit be13b0e1bf

View File

@@ -221,7 +221,7 @@ export async function GET(request: NextRequest) {
const res = await sendLoginname(command); const res = await sendLoginname(command);
if (res?.redirect) { if (res && "redirect" in res && res?.redirect) {
const absoluteUrl = new URL(res.redirect, request.url); const absoluteUrl = new URL(res.redirect, request.url);
return NextResponse.redirect(absoluteUrl.toString()); return NextResponse.redirect(absoluteUrl.toString());
} }
@@ -429,7 +429,7 @@ export async function GET(request: NextRequest) {
const res = await sendLoginname(command); const res = await sendLoginname(command);
if (res?.redirect) { if (res && "redirect" in res && res?.redirect) {
const absoluteUrl = new URL(res.redirect, request.url); const absoluteUrl = new URL(res.redirect, request.url);
return NextResponse.redirect(absoluteUrl.toString()); return NextResponse.redirect(absoluteUrl.toString());
} }