Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: session expired wasn't getting recreated on demo

Andrej30c0fbbc25fd
diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts
index 2cc8f8750..26667f5aa 100644
--- a/apps/api/src/index.ts
+++ b/apps/api/src/index.ts
@@ -50,21 +50,21 @@ const app = new Elysia()
}
store.userEmail = user?.email ?? "";
- }
+ } else {
+ if (!session?.value) {
+ return { user: null };
+ }
- if (!session?.value) {
- return { user: null };
- }
+ const { user, session: validatedSession } = await validateSessionToken(
+ session.value,
+ );
- const { user, session: validatedSession } = await validateSessionToken(
- session.value,
- );
+ if (!user || !validatedSession) {
+ return { user: null };
+ }
- if (!user || !validatedSession) {
- return { user: null };
+ store.userEmail = user.email;
}
-
- store.userEmail = user.email;
},
})
.get("/me", async ({ cookie: { session } }) => {
diff --git a/bun.lockb b/bun.lockb
index 4234bd1ef..dfa44ae85 100755
Binary files a/bun.lockb and b/bun.lockb differ