fix playerId cookie
This commit is contained in:
parent
dc3d5b9b33
commit
f9fbeebe75
@ -9,7 +9,7 @@ export function middleware(request: NextRequest) {
|
||||
if (pathname == "/") {
|
||||
if (playerIdCookie) {
|
||||
return NextResponse.redirect(
|
||||
new URL(`/player/${playerIdCookie}`, request.url),
|
||||
new URL(`/player/${playerIdCookie.value}`, request.url),
|
||||
);
|
||||
} else {
|
||||
return NextResponse.redirect(new URL("/search", request.url));
|
||||
|
@ -44,7 +44,9 @@ export const useSettingsStore = create<SettingsStore>()(
|
||||
player: playerData,
|
||||
});
|
||||
|
||||
cookieCutter.set("playerId", playerData.id);
|
||||
cookieCutter.set("playerId", playerData.id, {
|
||||
path: "/",
|
||||
});
|
||||
},
|
||||
|
||||
async addFriend(friendId: string) {
|
||||
|
Loading…
Reference in New Issue
Block a user