@adminforth/user-soft-delete 1.2.4 → 1.2.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.
- package/build.log +2 -2
- package/custom/tsconfig.json +1 -4
- package/dist/custom/tsconfig.json +1 -4
- package/dist/index.js +1 -7
- package/index.ts +1 -8
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -8,5 +8,5 @@ custom/DisableButton.vue
|
|
|
8
8
|
custom/UserSoftDeleteFilterSetter.vue
|
|
9
9
|
custom/tsconfig.json
|
|
10
10
|
|
|
11
|
-
sent
|
|
12
|
-
total size is 2,
|
|
11
|
+
sent 2,874 bytes received 77 bytes 5,902.00 bytes/sec
|
|
12
|
+
total size is 2,576 speedup is 0.87
|
package/custom/tsconfig.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"baseUrl": ".",
|
|
3
|
+
"baseUrl": ".",
|
|
4
4
|
"paths": {
|
|
5
5
|
"@/*": [
|
|
6
|
-
// "node_modules/adminforth/dist/spa/src/*"
|
|
7
6
|
"../../../adminforth/spa/src/*"
|
|
8
7
|
],
|
|
9
8
|
"*": [
|
|
10
|
-
// "node_modules/adminforth/dist/spa/node_modules/*"
|
|
11
9
|
"../../../adminforth/spa/node_modules/*"
|
|
12
10
|
],
|
|
13
11
|
"@@/*": [
|
|
14
|
-
// "node_modules/adminforth/dist/spa/src/*"
|
|
15
12
|
"."
|
|
16
13
|
]
|
|
17
14
|
}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"baseUrl": ".",
|
|
3
|
+
"baseUrl": ".",
|
|
4
4
|
"paths": {
|
|
5
5
|
"@/*": [
|
|
6
|
-
// "node_modules/adminforth/dist/spa/src/*"
|
|
7
6
|
"../../../adminforth/spa/src/*"
|
|
8
7
|
],
|
|
9
8
|
"*": [
|
|
10
|
-
// "node_modules/adminforth/dist/spa/node_modules/*"
|
|
11
9
|
"../../../adminforth/spa/node_modules/*"
|
|
12
10
|
],
|
|
13
11
|
"@@/*": [
|
|
14
|
-
// "node_modules/adminforth/dist/spa/src/*"
|
|
15
12
|
"."
|
|
16
13
|
]
|
|
17
14
|
}
|
package/dist/index.js
CHANGED
|
@@ -122,13 +122,7 @@ 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.
|
|
126
|
-
resource: this.resourceConfig,
|
|
127
|
-
recordId: id,
|
|
128
|
-
oldRecord: oldUser,
|
|
129
|
-
record: newUser,
|
|
130
|
-
adminUser: adminUser
|
|
131
|
-
});
|
|
125
|
+
yield this.adminforth.resource(this.resourceConfig.resourceId).update(id, newUser);
|
|
132
126
|
return { ok: true };
|
|
133
127
|
})
|
|
134
128
|
});
|
package/index.ts
CHANGED
|
@@ -135,14 +135,7 @@ export default class UserSoftDelete extends AdminForthPlugin {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
const newUser = { [this.options.activeFieldName]: false };
|
|
138
|
-
|
|
139
|
-
await this.adminforth.updateResourceRecord({
|
|
140
|
-
resource: this.resourceConfig,
|
|
141
|
-
recordId: id,
|
|
142
|
-
oldRecord: oldUser,
|
|
143
|
-
record: newUser,
|
|
144
|
-
adminUser: adminUser
|
|
145
|
-
})
|
|
138
|
+
await this.adminforth.resource(this.resourceConfig.resourceId).update(id, newUser);
|
|
146
139
|
return {ok: true}
|
|
147
140
|
}
|
|
148
141
|
});
|