@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 +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
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 =
|
|
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 = {
|
|
137
|
+
const newUser = { [this.options.activeFieldName]: false };
|
|
138
138
|
|
|
139
139
|
await this.adminforth.updateResourceRecord({
|
|
140
140
|
resource: this.resourceConfig,
|