From 4c36a950a7d4a8b6b6921efe7e85935cb7c4babd Mon Sep 17 00:00:00 2001 From: Nick J Date: Wed, 23 Jul 2025 22:05:03 -0400 Subject: [PATCH] Set user ID to 0 if not using accounts --- src/pages/root.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/root.tsx b/src/pages/root.tsx index 35e0c86..374e442 100644 --- a/src/pages/root.tsx +++ b/src/pages/root.tsx @@ -33,7 +33,7 @@ export const root = new Elysia() let user: ({ id: string } & JWTPayloadSpec) | false = false; if (ALLOW_UNAUTHENTICATED) { const newUserId = String( - randomInt(2 ** 24, Math.min(2 ** 48 + 2 ** 24 - 1, Number.MAX_SAFE_INTEGER)), + ACCOUNT_REGISTRATION ? randomInt(2 ** 24, Math.min(2 ** 48 + 2 ** 24 - 1, Number.MAX_SAFE_INTEGER)) : 0, ); const accessToken = await jwt.sign({ id: newUserId,