X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Faccount%2Fuser.ts;h=e7503952138402d67b52e2ed56399dcf3e643bb6;hb=d1ab89deb79f70c439b58750d044d9cadf1194e5;hp=4a9acd703a94e2615229fe1cb8ee0fbf1d65d164;hpb=3acc50844047a37698f0618fa235c138e386a053;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/account/user.ts b/server/models/account/user.ts index 4a9acd703..e75039521 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts @@ -113,6 +113,11 @@ export class UserModel extends Model { @Column(DataType.STRING(400)) email: string + @AllowNull(true) + @IsEmail + @Column(DataType.STRING(400)) + pendingEmail: string + @AllowNull(true) @Default(null) @Is('UserEmailVerified', value => throwIfNotValid(value, isUserEmailVerifiedValid, 'email verified boolean', true)) @@ -540,6 +545,7 @@ export class UserModel extends Model { id: this.id, username: this.username, email: this.email, + pendingEmail: this.pendingEmail, emailVerified: this.emailVerified, nsfwPolicy: this.nsfwPolicy, webTorrentEnabled: this.webTorrentEnabled,