From d1ab89deb79f70c439b58750d044d9cadf1194e5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jun 2019 11:54:33 +0200 Subject: Handle email update on server --- server/models/account/user.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/models') 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, -- cgit v1.2.3