From f421716f5c42b65970b3c5351537e827a113d74f Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 09:52:21 +0100 Subject: [PATCH] fix middleware path --- src/middleware.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/middleware.ts b/src/middleware.ts index 4d6e841..e4b60f3 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -9,7 +9,10 @@ export function middleware(request: NextRequest) { if (pathname == "/") { if (playerIdCookie) { return NextResponse.redirect( - new URL(`/player/${playerIdCookie.value}`, request.url), + new URL( + `/player/${playerIdCookie.value}/scoresaber/top/1`, + request.url, + ), ); } else { return NextResponse.redirect(new URL("/search", request.url));