From 3523600f40f281407253b71b365e410f2d2f2d46 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:49:22 +0000 Subject: [PATCH] add timestamps --- apps/server/src/common/helpers/types/export-metadata.types.ts | 2 ++ apps/server/src/database/repos/page/page.repo.ts | 4 ++++ apps/server/src/integrations/export/export.service.ts | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/apps/server/src/common/helpers/types/export-metadata.types.ts b/apps/server/src/common/helpers/types/export-metadata.types.ts index 42ef4c68..f901c0e2 100644 --- a/apps/server/src/common/helpers/types/export-metadata.types.ts +++ b/apps/server/src/common/helpers/types/export-metadata.types.ts @@ -4,6 +4,8 @@ export type ExportPageMetadata = { icon: string | null; position: string; parentPath: string | null; + createdAt: string; + updatedAt: string; }; export type ExportMetadata = { diff --git a/apps/server/src/database/repos/page/page.repo.ts b/apps/server/src/database/repos/page/page.repo.ts index f2b27abb..52337bb1 100644 --- a/apps/server/src/database/repos/page/page.repo.ts +++ b/apps/server/src/database/repos/page/page.repo.ts @@ -422,6 +422,8 @@ export class PageRepo { 'parentPageId', 'spaceId', 'workspaceId', + 'createdAt', + 'updatedAt', ]) .$if(opts?.includeContent, (qb) => qb.select('content')) .where('id', '=', parentPageId) @@ -438,6 +440,8 @@ export class PageRepo { 'p.parentPageId', 'p.spaceId', 'p.workspaceId', + 'p.createdAt', + 'p.updatedAt', ]) .$if(opts?.includeContent, (qb) => qb.select('p.content')) .innerJoin('page_hierarchy as ph', 'p.parentPageId', 'ph.id') diff --git a/apps/server/src/integrations/export/export.service.ts b/apps/server/src/integrations/export/export.service.ts index 44047174..655e31d3 100644 --- a/apps/server/src/integrations/export/export.service.ts +++ b/apps/server/src/integrations/export/export.service.ts @@ -167,6 +167,8 @@ export class ExportService { 'pages.parentPageId', 'pages.spaceId', 'pages.workspaceId', + 'pages.createdAt', + 'pages.updatedAt', ]) .where('spaceId', '=', spaceId) .where('deletedAt', 'is', null) @@ -253,6 +255,8 @@ export class ExportService { icon: page.icon ?? null, position: page.position, parentPath, + createdAt: page.createdAt?.toISOString() ?? new Date().toISOString(), + updatedAt: page.updatedAt?.toISOString() ?? new Date().toISOString(), }; if (childPages.length > 0) {