Skip to content

Commit 4c3dae6

Browse files
committed
fix: simplify user object creation in deactivate logic
1 parent bb3c58f commit 4c3dae6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export default class UserSoftDelete extends AdminForthPlugin {
134134
return {ok: false, error: "You cannot deactivate your own account"}
135135
}
136136

137-
const newUser = { ...oldUser, [this.options.activeFieldName]: false };
137+
const newUser = { [this.options.activeFieldName]: false };
138138

139139
await this.adminforth.updateResourceRecord({
140140
resource: this.resourceConfig,

0 commit comments

Comments
 (0)