From a25cf84671dfa3f6ddbc02a6c9bf637e95b0e539 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:29:13 +0000 Subject: [PATCH] fix: add spaceId --- apps/server/src/database/repos/page/page.repo.ts | 3 ++- apps/server/src/integrations/export/export.service.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/server/src/database/repos/page/page.repo.ts b/apps/server/src/database/repos/page/page.repo.ts index eb7f957..a888442 100644 --- a/apps/server/src/database/repos/page/page.repo.ts +++ b/apps/server/src/database/repos/page/page.repo.ts @@ -166,7 +166,7 @@ export class PageRepo { .withRecursive('page_hierarchy', (db) => db .selectFrom('pages') - .select(['id', 'slugId', 'title', 'icon', 'content', 'parentPageId']) + .select(['id', 'slugId', 'title', 'icon', 'content', 'parentPageId', 'spaceId']) .where('id', '=', parentPageId) .unionAll((exp) => exp @@ -178,6 +178,7 @@ export class PageRepo { 'p.icon', 'p.content', 'p.parentPageId', + 'p.spaceId', ]) .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 aaa7e04..c2b61a0 100644 --- a/apps/server/src/integrations/export/export.service.ts +++ b/apps/server/src/integrations/export/export.service.ts @@ -115,6 +115,7 @@ export class ExportService { 'pages.title', 'pages.content', 'pages.parentPageId', + 'pages.spaceId' ]) .where('spaceId', '=', spaceId) .execute();