diff options
Diffstat (limited to 'server/models/account')
-rw-r--r-- | server/models/account/user.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/models/account/user.ts b/server/models/account/user.ts index e75039521..aac691d66 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts | |||
@@ -31,6 +31,7 @@ import { | |||
31 | isUserPasswordValid, | 31 | isUserPasswordValid, |
32 | isUserRoleValid, | 32 | isUserRoleValid, |
33 | isUserUsernameValid, | 33 | isUserUsernameValid, |
34 | isUserVideoLanguages, | ||
34 | isUserVideoQuotaDailyValid, | 35 | isUserVideoQuotaDailyValid, |
35 | isUserVideoQuotaValid, | 36 | isUserVideoQuotaValid, |
36 | isUserVideosHistoryEnabledValid, | 37 | isUserVideosHistoryEnabledValid, |
@@ -147,6 +148,12 @@ export class UserModel extends Model<UserModel> { | |||
147 | @Column | 148 | @Column |
148 | autoPlayVideo: boolean | 149 | autoPlayVideo: boolean |
149 | 150 | ||
151 | @AllowNull(true) | ||
152 | @Default(null) | ||
153 | @Is('UserVideoLanguages', value => throwIfNotValid(value, isUserVideoLanguages, 'video languages')) | ||
154 | @Column(DataType.ARRAY(DataType.STRING)) | ||
155 | videoLanguages: string[] | ||
156 | |||
150 | @AllowNull(false) | 157 | @AllowNull(false) |
151 | @Default(UserAdminFlag.NONE) | 158 | @Default(UserAdminFlag.NONE) |
152 | @Is('UserAdminFlags', value => throwIfNotValid(value, isUserAdminFlagsValid, 'user admin flags')) | 159 | @Is('UserAdminFlags', value => throwIfNotValid(value, isUserAdminFlagsValid, 'user admin flags')) |
@@ -551,6 +558,7 @@ export class UserModel extends Model<UserModel> { | |||
551 | webTorrentEnabled: this.webTorrentEnabled, | 558 | webTorrentEnabled: this.webTorrentEnabled, |
552 | videosHistoryEnabled: this.videosHistoryEnabled, | 559 | videosHistoryEnabled: this.videosHistoryEnabled, |
553 | autoPlayVideo: this.autoPlayVideo, | 560 | autoPlayVideo: this.autoPlayVideo, |
561 | videoLanguages: this.videoLanguages, | ||
554 | role: this.role, | 562 | role: this.role, |
555 | roleLabel: USER_ROLE_LABELS[ this.role ], | 563 | roleLabel: USER_ROLE_LABELS[ this.role ], |
556 | videoQuota: this.videoQuota, | 564 | videoQuota: this.videoQuota, |