Explorar o código

use new Date instead of Date now

itizawa %!s(int64=5) %!d(string=hai) anos
pai
achega
77b991b45d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/server/service/page.js

+ 1 - 1
src/server/service/page.js

@@ -105,7 +105,7 @@ class PageService {
       if (updateMetadata) {
         unorderedBulkOp
           .find({ _id: page._id })
-          .update({ $set: { path: newPagePath, lastUpdateUser: user._id, updatedAt: Date.now().toISOString() } });
+          .update({ $set: { path: newPagePath, lastUpdateUser: user._id, updatedAt: new Date() } });
       }
       else {
         unorderedBulkOp.find({ _id: page._id }).update({ $set: { path: newPagePath } });