1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Handle email update on server

This commit is contained in:
Chocobozzz 2019-06-11 11:54:33 +02:00
parent fff77ba231
commit d1ab89deb7
No known key found for this signature in database
GPG key ID: 583A612D890159BE
12 changed files with 164 additions and 30 deletions

View file

@ -113,6 +113,11 @@ export class UserModel extends Model<UserModel> {
@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<UserModel> {
id: this.id,
username: this.username,
email: this.email,
pendingEmail: this.pendingEmail,
emailVerified: this.emailVerified,
nsfwPolicy: this.nsfwPolicy,
webTorrentEnabled: this.webTorrentEnabled,