WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 110bc89

Browse files
committed
Revert "fix: simplify user record update logic in UserSoftDelete class"
This reverts commit 7256eaa.
1 parent 71e2e42 commit 110bc89

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,14 @@ export default class UserSoftDelete extends AdminForthPlugin {
135135
}
136136

137137
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+
})
139146
return {ok: true}
140147
}
141148
});

0 commit comments

Comments
 (0)