mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
add timestamps
This commit is contained in:
@@ -4,6 +4,8 @@ export type ExportPageMetadata = {
|
|||||||
icon: string | null;
|
icon: string | null;
|
||||||
position: string;
|
position: string;
|
||||||
parentPath: string | null;
|
parentPath: string | null;
|
||||||
|
createdAt: string;
|
||||||
|
updatedAt: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ExportMetadata = {
|
export type ExportMetadata = {
|
||||||
|
|||||||
@@ -422,6 +422,8 @@ export class PageRepo {
|
|||||||
'parentPageId',
|
'parentPageId',
|
||||||
'spaceId',
|
'spaceId',
|
||||||
'workspaceId',
|
'workspaceId',
|
||||||
|
'createdAt',
|
||||||
|
'updatedAt',
|
||||||
])
|
])
|
||||||
.$if(opts?.includeContent, (qb) => qb.select('content'))
|
.$if(opts?.includeContent, (qb) => qb.select('content'))
|
||||||
.where('id', '=', parentPageId)
|
.where('id', '=', parentPageId)
|
||||||
@@ -438,6 +440,8 @@ export class PageRepo {
|
|||||||
'p.parentPageId',
|
'p.parentPageId',
|
||||||
'p.spaceId',
|
'p.spaceId',
|
||||||
'p.workspaceId',
|
'p.workspaceId',
|
||||||
|
'p.createdAt',
|
||||||
|
'p.updatedAt',
|
||||||
])
|
])
|
||||||
.$if(opts?.includeContent, (qb) => qb.select('p.content'))
|
.$if(opts?.includeContent, (qb) => qb.select('p.content'))
|
||||||
.innerJoin('page_hierarchy as ph', 'p.parentPageId', 'ph.id')
|
.innerJoin('page_hierarchy as ph', 'p.parentPageId', 'ph.id')
|
||||||
|
|||||||
@@ -167,6 +167,8 @@ export class ExportService {
|
|||||||
'pages.parentPageId',
|
'pages.parentPageId',
|
||||||
'pages.spaceId',
|
'pages.spaceId',
|
||||||
'pages.workspaceId',
|
'pages.workspaceId',
|
||||||
|
'pages.createdAt',
|
||||||
|
'pages.updatedAt',
|
||||||
])
|
])
|
||||||
.where('spaceId', '=', spaceId)
|
.where('spaceId', '=', spaceId)
|
||||||
.where('deletedAt', 'is', null)
|
.where('deletedAt', 'is', null)
|
||||||
@@ -253,6 +255,8 @@ export class ExportService {
|
|||||||
icon: page.icon ?? null,
|
icon: page.icon ?? null,
|
||||||
position: page.position,
|
position: page.position,
|
||||||
parentPath,
|
parentPath,
|
||||||
|
createdAt: page.createdAt?.toISOString() ?? new Date().toISOString(),
|
||||||
|
updatedAt: page.updatedAt?.toISOString() ?? new Date().toISOString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (childPages.length > 0) {
|
if (childPages.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user