user 6 年之前
父节点
当前提交
f4eb4356aa
共有 3 个文件被更改,包括 3 次插入1 次删除
  1. 1 0
      lib/index.js
  2. 1 1
      lib/index.js.map
  3. 1 0
      src/index.ts

+ 1 - 0
lib/index.js

@@ -286,6 +286,7 @@ class BankClient {
             delete newProps.id;
             delete newProps.id;
             const newItem = util_1.mergeDeep(existingData, newProps);
             const newItem = util_1.mergeDeep(existingData, newProps);
             delete newItem.hash;
             delete newItem.hash;
+            newItem.lastChanged = new Date().toLocaleString();
             const newItemHash = yield this.uploadSlimJSON(newItem);
             const newItemHash = yield this.uploadSlimJSON(newItem);
             yield this.appendPrivate(peerId, '📇', newItemHash, existing.hash);
             yield this.appendPrivate(peerId, '📇', newItemHash, existing.hash);
             const contactBook2 = yield this.getContactBook(peerId);
             const contactBook2 = yield this.getContactBook(peerId);

文件差异内容过多而无法显示
+ 1 - 1
lib/index.js.map


+ 1 - 0
src/index.ts

@@ -277,6 +277,7 @@ export class BankClient {
       delete newProps.id;
       delete newProps.id;
       const newItem: any = mergeDeep(existingData, newProps);
       const newItem: any = mergeDeep(existingData, newProps);
       delete newItem.hash;
       delete newItem.hash;
+      newItem.lastChanged = new Date().toLocaleString();
       const newItemHash = await this.uploadSlimJSON(newItem);
       const newItemHash = await this.uploadSlimJSON(newItem);
       await this.appendPrivate(peerId, '📇', newItemHash, existing.hash);
       await this.appendPrivate(peerId, '📇', newItemHash, existing.hash);
       const contactBook2 = await this.getContactBook(peerId);
       const contactBook2 = await this.getContactBook(peerId);