Skip to content

Commit

Permalink
Merge pull request #164 from osu-tournament-rating/fix/user-keys-rename
Browse files Browse the repository at this point in the history
User keys rename
  • Loading branch information
hburn7 authored Apr 25, 2024
2 parents 3fc78fa + 34fd5f6 commit 55c2d2e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ export async function login(cookie: {
session.id = loggedUser.id;
session.playerId = loggedUser.playerId;
session.osuId = loggedUser.osuId;
session.osuCountry = loggedUser.osuCountry;
session.osuPlayMode = loggedUser.osuPlayMode;
session.osuPlayModeSelected = loggedUser.osuPlayMode; // maybe to delete
session.username = loggedUser.osuUsername;
session.osuCountry = loggedUser.country;
session.osuPlayMode = loggedUser.ruleset ?? '0';
session.osuPlayModeSelected = loggedUser.ruleset ?? '0'; // maybe to delete
session.username = loggedUser.username;
session.scopes = loggedUser.scopes;
session.isLogged = true;

await cookies().set('OTR-user-selected-osu-mode', loggedUser.osuPlayMode, {
await cookies().set('OTR-user-selected-osu-mode', loggedUser.ruleset ?? '0', {
httpOnly: true,
path: '/',
sameSite: 'strict',
Expand All @@ -94,7 +94,6 @@ export async function login(cookie: {

await session.save();

/* await changeOsuModeCookie(res.osuPlayMode); */
return NextResponse.redirect(new URL('/', process.env.REACT_APP_ORIGIN_URL));
}

Expand Down

0 comments on commit 55c2d2e

Please sign in to comment.