Explorar o código

change the way to define default value

yohei0125 %!s(int64=4) %!d(string=hai) anos
pai
achega
3be85103fa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/app/src/server/models/page-operation.ts

+ 1 - 1
packages/app/src/server/models/page-operation.ts

@@ -106,7 +106,7 @@ const schema = new Schema<PageOperationDocument, PageOperationModel>({
   user: { type: userSchemaForResuming, required: true },
   options: { type: optionsSchemaForResuming },
   incForUpdatingDescendantCount: { type: Number },
-  unprocessableExpiryDate: { type: Date, default: addSeconds(new Date(), 10) },
+  unprocessableExpiryDate: { type: Date, default: () => addSeconds(new Date(), 10) },
 });
 
 schema.statics.findByIdAndUpdatePageActionStage = async function(