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:
parent
fff77ba231
commit
d1ab89deb7
12 changed files with 164 additions and 30 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue