Skip to content

Commit 4c36a95

Browse files
NickJ-7010C4illin
authored andcommitted
Set user ID to 0 if not using accounts
1 parent a9bc9d7 commit 4c36a95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const root = new Elysia()
3333
let user: ({ id: string } & JWTPayloadSpec) | false = false;
3434
if (ALLOW_UNAUTHENTICATED) {
3535
const newUserId = String(
36-
randomInt(2 ** 24, Math.min(2 ** 48 + 2 ** 24 - 1, Number.MAX_SAFE_INTEGER)),
36+
ACCOUNT_REGISTRATION ? randomInt(2 ** 24, Math.min(2 ** 48 + 2 ** 24 - 1, Number.MAX_SAFE_INTEGER)) : 0,
3737
);
3838
const accessToken = await jwt.sign({
3939
id: newUserId,

0 commit comments

Comments
 (0)