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;
|
||||
position: string;
|
||||
parentPath: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type ExportMetadata = {
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user