diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/account/user.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/account/user.ts b/server/models/account/user.ts index b8ca1dd5c..6f0b0e00f 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts | |||
@@ -44,7 +44,7 @@ import { VideoChannelModel } from '../video/video-channel' | |||
44 | import { AccountModel } from './account' | 44 | import { AccountModel } from './account' |
45 | import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' | 45 | import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' |
46 | import { values } from 'lodash' | 46 | import { values } from 'lodash' |
47 | import { DEFAULT_THEME, NSFW_POLICY_TYPES } from '../../initializers/constants' | 47 | import { DEFAULT_THEME_NAME, DEFAULT_USER_THEME_NAME, NSFW_POLICY_TYPES } from '../../initializers/constants' |
48 | import { clearCacheByUserId } from '../../lib/oauth-model' | 48 | import { clearCacheByUserId } from '../../lib/oauth-model' |
49 | import { UserNotificationSettingModel } from './user-notification-setting' | 49 | import { UserNotificationSettingModel } from './user-notification-setting' |
50 | import { VideoModel } from '../video/video' | 50 | import { VideoModel } from '../video/video' |
@@ -190,7 +190,7 @@ export class UserModel extends Model<UserModel> { | |||
190 | videoQuotaDaily: number | 190 | videoQuotaDaily: number |
191 | 191 | ||
192 | @AllowNull(false) | 192 | @AllowNull(false) |
193 | @Default(DEFAULT_THEME) | 193 | @Default(DEFAULT_THEME_NAME) |
194 | @Is('UserTheme', value => throwIfNotValid(value, isThemeValid, 'theme')) | 194 | @Is('UserTheme', value => throwIfNotValid(value, isThemeValid, 'theme')) |
195 | @Column | 195 | @Column |
196 | theme: string | 196 | theme: string |
@@ -568,7 +568,7 @@ export class UserModel extends Model<UserModel> { | |||
568 | autoPlayVideo: this.autoPlayVideo, | 568 | autoPlayVideo: this.autoPlayVideo, |
569 | videoLanguages: this.videoLanguages, | 569 | videoLanguages: this.videoLanguages, |
570 | role: this.role, | 570 | role: this.role, |
571 | theme: getThemeOrDefault(this.theme), | 571 | theme: getThemeOrDefault(this.theme, DEFAULT_USER_THEME_NAME), |
572 | roleLabel: USER_ROLE_LABELS[ this.role ], | 572 | roleLabel: USER_ROLE_LABELS[ this.role ], |
573 | videoQuota: this.videoQuota, | 573 | videoQuota: this.videoQuota, |
574 | videoQuotaDaily: this.videoQuotaDaily, | 574 | videoQuotaDaily: this.videoQuotaDaily, |