Futa Arai пре 2 година
родитељ
комит
5bcd30207d

+ 3 - 3
apps/app/src/features/page-bulk-export/interfaces/page-bulk-export.ts

@@ -2,19 +2,19 @@ import type {
   IAttachment, IPage, IRevision, IUser, Ref,
 } from '@growi/core';
 
-export const PageBulkExportType = {
+export const PageBulkExportFormat = {
   markdown: 'markdown',
   pdf: 'pdf',
 } as const;
 
-type PageBulkExportType = typeof PageBulkExportType[keyof typeof PageBulkExportType]
+type PageBulkExportFormat = typeof PageBulkExportFormat[keyof typeof PageBulkExportFormat]
 
 export interface IPageBulkExportJob {
   user: Ref<IUser>, // user that started export job
   page: Ref<IPage>, // the root page of page tree to export
   lastUploadedPagePath: string, // the path of page that was uploaded last
   uploadId: string, // upload ID of multipart upload of S3/GCS
-  type: PageBulkExportType,
+  format: PageBulkExportFormat,
   expireAt: Date, // the date at which job execution expires
 }
 

+ 2 - 2
apps/app/src/features/page-bulk-export/server/models/page-bulk-export-job.ts

@@ -2,7 +2,7 @@ import { Document, Model, Schema } from 'mongoose';
 
 import { getOrCreateModel } from '~/server/util/mongoose-utils';
 
-import { IPageBulkExportJob, PageBulkExportType } from '../../interfaces/page-bulk-export';
+import { IPageBulkExportJob, PageBulkExportFormat } from '../../interfaces/page-bulk-export';
 
 export interface PageBulkExportJobDocument extends IPageBulkExportJob, Document {}
 
@@ -13,7 +13,7 @@ const pageBulkExportJobSchema = new Schema<PageBulkExportJobDocument>({
   page: { type: Schema.Types.ObjectId, ref: 'Page', required: true },
   lastUploadedPagePath: { type: String, required: true },
   uploadId: { type: String, required: true },
-  type: { type: String, enum: Object.values(PageBulkExportType), required: true },
+  format: { type: String, enum: Object.values(PageBulkExportFormat), required: true },
   expireAt: { type: Date, required: true },
 }, { timestamps: true });