Просмотр исходного кода

Merge branch 'feat/wip-page' into feat/140129-turn-existing-pages-into-wip-pages

Shun Miyazawa 2 лет назад
Родитель
Сommit
cc6c4af098
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      apps/app/src/server/models/page.ts
  2. 1 1
      apps/app/src/server/service/page/index.ts

+ 1 - 1
apps/app/src/server/models/page.ts

@@ -1060,11 +1060,11 @@ schema.methods.publish = function() {
 
 schema.methods.unpublish = function() {
   this.wip = true;
-  this.wipExpiredAt = new Date();
 };
 
 schema.methods.makeWip = function() {
   this.wip = true;
+  this.wipExpiredAt = new Date();
 };
 
 /*

+ 1 - 1
apps/app/src/server/service/page/index.ts

@@ -3793,7 +3793,7 @@ class PageService implements IPageService {
 
     // Set wip
     if (options.wip) {
-      page.unpublish();
+      page.makeWip();
     }
 
     // Save