Switched emails to being mandetory for users

ref #93
This commit is contained in:
2021-01-13 17:44:22 +01:00
parent cf788fe07b
commit 9feeb302e8
8 changed files with 40 additions and 24 deletions

View File

@@ -25,9 +25,10 @@ export class User extends Principal {
* The user's e-mail address.
* Either username or email has to be set (otherwise the user couldn't log in).
*/
@Column({ nullable: true, unique: true })
@Column({ nullable: false, unique: true })
@IsEmail()
email?: string;
@IsNotEmpty()
email: string;
/**
* The user's phone number.