Compare commits

...

2 Commits

Author SHA1 Message Date
19fa265166 Merge branch 'master' of https://git.fascinated.cc/Fascinated/scoresaber-reloaded-v2
Some checks failed
deploy / deploy (push) Has been cancelled
2023-10-24 09:51:50 +01:00
f9fbeebe75 fix playerId cookie 2023-10-24 09:51:49 +01:00
2 changed files with 4 additions and 2 deletions

@ -9,7 +9,7 @@ export function middleware(request: NextRequest) {
if (pathname == "/") { if (pathname == "/") {
if (playerIdCookie) { if (playerIdCookie) {
return NextResponse.redirect( return NextResponse.redirect(
new URL(`/player/${playerIdCookie}`, request.url), new URL(`/player/${playerIdCookie.value}`, request.url),
); );
} else { } else {
return NextResponse.redirect(new URL("/search", request.url)); return NextResponse.redirect(new URL("/search", request.url));

@ -44,7 +44,9 @@ export const useSettingsStore = create<SettingsStore>()(
player: playerData, player: playerData,
}); });
cookieCutter.set("playerId", playerData.id); cookieCutter.set("playerId", playerData.id, {
path: "/",
});
}, },
async addFriend(friendId: string) { async addFriend(friendId: string) {