Skip to content

Commit

Permalink
Fikser bug i /informasjon redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
toresbe committed Aug 20, 2024
1 parent 5c7602b commit c87e86f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/informasjon/route.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import {NextRequest, NextResponse} from "next/server";
import {BASE_PATH} from "../../lib/constants.ts";

export async function GET({nextUrl}: NextRequest) {
// If there's an "axiosError" GET query parameter, we log an error.
if (nextUrl.searchParams.has("axiosError")) {
console.error("axiosError", nextUrl.searchParams.get("axiosError"));
}

return NextResponse.redirect("/");
nextUrl.pathname = BASE_PATH;
return NextResponse.redirect(nextUrl);
}

0 comments on commit c87e86f

Please sign in to comment.