Skip to content

Commit

Permalink
move method down
Browse files Browse the repository at this point in the history
  • Loading branch information
cynicaloptimist committed Sep 14, 2023
1 parent e0ff587 commit db0b7e7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions server/patreon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ function getEntitledTierIds(apiResponse: Record<string, any>) {
return entitledTierIds;
}

export function updateSessionAccountFeatures(
session: Express.Session,
standing: AccountStatus
): void {
session.hasStorage = standing == "pledge" || standing == "epic";
session.hasEpicInitiative = standing == "epic";
session.isLoggedIn = true;
}

function getUserAccountLevel(
userId: string,
rewardIds: string[]
Expand All @@ -186,6 +177,15 @@ function getUserAccountLevel(
return standing;
}

export function updateSessionAccountFeatures(
session: Express.Session,
standing: AccountStatus
): void {
session.hasStorage = standing == "pledge" || standing == "epic";
session.hasEpicInitiative = standing == "epic";
session.isLoggedIn = true;
}

export function configureLogout(app: express.Application): void {
const logoutPath = "/logout";
app.get(logoutPath, (req: Req, res: Res) => {
Expand Down

0 comments on commit db0b7e7

Please sign in to comment.