fix(core): Fix user-management:reset command (#3403)

* 🐛 Fix `email` setting

* 🧪 Add test

* 🧪 Add expectation for user email

*  Replace request with helper
This commit is contained in:
Iván Ovejero
2022-06-03 17:44:34 +02:00
committed by GitHub
parent a5d2ddfa26
commit 58ecadf53c
2 changed files with 45 additions and 1 deletions

View File

@@ -133,7 +133,7 @@ export class User {
@BeforeInsert()
@BeforeUpdate()
preUpsertHook(): void {
this.email = this.email?.toLowerCase();
this.email = this.email?.toLowerCase() ?? null;
this.updatedAt = new Date();
}