aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-11 11:54:33 +0200
committerChocobozzz <me@florianbigard.com>2019-06-11 14:31:11 +0200
commitd1ab89deb79f70c439b58750d044d9cadf1194e5 (patch)
tree3cd18a0a8a3bf7497aec9d803c759bf54656115c /server/models/account
parentfff77ba23191f9bca959d5989a1f1df331dbac0b (diff)
downloadPeerTube-d1ab89deb79f70c439b58750d044d9cadf1194e5.tar.gz
PeerTube-d1ab89deb79f70c439b58750d044d9cadf1194e5.tar.zst
PeerTube-d1ab89deb79f70c439b58750d044d9cadf1194e5.zip
Handle email update on server
Diffstat (limited to 'server/models/account')
-rw-r--r--server/models/account/user.ts6
1 files changed, 6 insertions, 0 deletions
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
@@ -114,6 +114,11 @@ export class UserModel extends Model<UserModel> {
114 email: string 114 email: string
115 115
116 @AllowNull(true) 116 @AllowNull(true)
117 @IsEmail
118 @Column(DataType.STRING(400))
119 pendingEmail: string
120
121 @AllowNull(true)
117 @Default(null) 122 @Default(null)
118 @Is('UserEmailVerified', value => throwIfNotValid(value, isUserEmailVerifiedValid, 'email verified boolean', true)) 123 @Is('UserEmailVerified', value => throwIfNotValid(value, isUserEmailVerifiedValid, 'email verified boolean', true))
119 @Column 124 @Column
@@ -540,6 +545,7 @@ export class UserModel extends Model<UserModel> {
540 id: this.id, 545 id: this.id,
541 username: this.username, 546 username: this.username,
542 email: this.email, 547 email: this.email,
548 pendingEmail: this.pendingEmail,
543 emailVerified: this.emailVerified, 549 emailVerified: this.emailVerified,
544 nsfwPolicy: this.nsfwPolicy, 550 nsfwPolicy: this.nsfwPolicy,
545 webTorrentEnabled: this.webTorrentEnabled, 551 webTorrentEnabled: this.webTorrentEnabled,