@bunnarin/plugin-audit-log 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,15 +51,6 @@ var auditConfig_default = (0, import_database.defineCollection)({
51
51
  required: true
52
52
  }
53
53
  },
54
- {
55
- type: "belongsTo",
56
- name: "collection",
57
- target: "collections",
58
- targetKey: "name",
59
- sourceKey: "id",
60
- foreignKey: "collection",
61
- constraints: false
62
- },
63
54
  {
64
55
  type: "boolean",
65
56
  name: "skipIP",
@@ -62,11 +62,11 @@ class PluginAuditLogServer extends import_server.Plugin {
62
62
  }
63
63
  });
64
64
  if (type === "create")
65
- await (0, import_afterCreate.afterCreate)(model, options, ip ? ipRecord.get("id") : null);
65
+ await (0, import_afterCreate.afterCreate)(model, options, ipRecord ? ipRecord.get("id") : null);
66
66
  else if (type === "update")
67
- await (0, import_afterUpdate.afterUpdate)(model, options, ip ? ipRecord.get("id") : null, config);
67
+ await (0, import_afterUpdate.afterUpdate)(model, options, ipRecord ? ipRecord.get("id") : null, config);
68
68
  else if (type === "delete")
69
- await (0, import_afterDestroy.afterDestroy)(model, options, ip ? ipRecord.get("id") : null);
69
+ await (0, import_afterDestroy.afterDestroy)(model, options, ipRecord ? ipRecord.get("id") : null);
70
70
  }
71
71
  }
72
72
  var server_default = PluginAuditLogServer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnarin/plugin-audit-log",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "displayName": "Audit logs",
5
5
  "displayName.ru-RU": "Журнал аудита",
6
6
  "displayName.zh-CN": "审计日志",