@adminforth/user-soft-delete 1.2.1 → 1.2.2

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
@@ -121,7 +121,7 @@ export default class UserSoftDelete extends AdminForthPlugin {
121
121
  if (oldUser[primaryKeyColumn.name] === adminUser.dbUser[primaryKeyColumn.name]) {
122
122
  return { ok: false, error: "You cannot deactivate your own account" };
123
123
  }
124
- const newUser = Object.assign(Object.assign({}, oldUser), { [this.options.activeFieldName]: false });
124
+ const newUser = { [this.options.activeFieldName]: false };
125
125
  yield this.adminforth.updateResourceRecord({
126
126
  resource: this.resourceConfig,
127
127
  recordId: id,
package/index.ts CHANGED
@@ -134,7 +134,7 @@ export default class UserSoftDelete extends AdminForthPlugin {
134
134
  return {ok: false, error: "You cannot deactivate your own account"}
135
135
  }
136
136
 
137
- const newUser = { ...oldUser, [this.options.activeFieldName]: false };
137
+ const newUser = { [this.options.activeFieldName]: false };
138
138
 
139
139
  await this.adminforth.updateResourceRecord({
140
140
  resource: this.resourceConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/user-soft-delete",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",