@adminforth/user-soft-delete 1.2.7 → 1.2.9

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.
package/dist/index.js CHANGED
@@ -122,7 +122,13 @@ export default class UserSoftDelete extends AdminForthPlugin {
122
122
  return { ok: false, error: "You cannot deactivate your own account" };
123
123
  }
124
124
  const newUser = { [this.options.activeFieldName]: false };
125
- yield this.adminforth.resource(this.resourceConfig.resourceId).update(id, newUser);
125
+ yield this.adminforth.updateResourceRecord({
126
+ resource: this.resourceConfig,
127
+ recordId: id,
128
+ oldRecord: oldUser,
129
+ record: newUser,
130
+ adminUser: adminUser
131
+ });
126
132
  return { ok: true };
127
133
  })
128
134
  });
package/index.ts CHANGED
@@ -135,7 +135,14 @@ export default class UserSoftDelete extends AdminForthPlugin {
135
135
  }
136
136
 
137
137
  const newUser = { [this.options.activeFieldName]: false };
138
- await this.adminforth.resource(this.resourceConfig.resourceId).update(id, newUser);
138
+
139
+ await this.adminforth.updateResourceRecord({
140
+ resource: this.resourceConfig,
141
+ recordId: id,
142
+ oldRecord: oldUser,
143
+ record: newUser,
144
+ adminUser: adminUser
145
+ })
139
146
  return {ok: true}
140
147
  }
141
148
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/user-soft-delete",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -21,7 +21,7 @@
21
21
  "typescript": "^5.7.3"
22
22
  },
23
23
  "peerDependencies": {
24
- "adminforth": "^2.4.0-next.254"
24
+ "adminforth": "^2.13.0-next.46"
25
25
  },
26
26
  "release": {
27
27
  "plugins": [