@adminforth/user-soft-delete 1.2.8 → 1.2.10
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/build.log +1 -1
- package/dist/index.js +7 -1
- package/index.ts +8 -1
- package/package.json +2 -2
package/build.log
CHANGED
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.
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"semantic-release-slack-bot": "^4.0.2",
|
|
21
21
|
"typescript": "^5.7.3"
|
|
22
22
|
},
|
|
23
|
-
"
|
|
23
|
+
"dependencies": {
|
|
24
24
|
"adminforth": "^2.13.0-next.46"
|
|
25
25
|
},
|
|
26
26
|
"release": {
|