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: making new session for demo user and updating data purge for every hour

Andrej Acevski4db1105681b8
diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts
index ad6e5c71d..3eef08fb2 100644
--- a/apps/api/src/index.ts
+++ b/apps/api/src/index.ts
@@ -21,7 +21,7 @@ const app = new Elysia()
.use(
cron({
name: "purge-demo-data",
- pattern: "0 0 * * *",
+ pattern: "0 * * * *",
run: async () => {
const isDemoMode = process.env.DEMO_MODE === "true";
@@ -36,7 +36,7 @@ const app = new Elysia()
async beforeHandle({ store, cookie: { session }, set }) {
const isDemoMode = process.env.DEMO_MODE === "true";
- if (isDemoMode && !session?.value) {
+ if (isDemoMode) {
const {
id,
name,
diff --git a/apps/web/src/components/demo-alert.tsx b/apps/web/src/components/demo-alert.tsx
index 7f246b34c..e8ed8dd26 100644
--- a/apps/web/src/components/demo-alert.tsx
+++ b/apps/web/src/components/demo-alert.tsx
@@ -6,7 +6,7 @@ export function DemoAlert() {
<div className="flex flex-col sm:flex-row items-center justify-center gap-2 text-sm text-amber-900 dark:text-amber-300">
<p className="flex flex-col sm:flex-row items-center gap-2">
This is a demo environment. All data will be automatically purged
- every 24 hours.
+ every hour.
<Button
onClick={() =>
window.open("https://github.com/kaneo-app/app", "_blank")
diff --git a/bun.lockb b/bun.lockb
index 7c7cb7d55..6d15ec2f9 100755
Binary files a/bun.lockb and b/bun.lockb differ