aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/account/user.ts6
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'
44import { AccountModel } from './account' 44import { AccountModel } from './account'
45import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' 45import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type'
46import { values } from 'lodash' 46import { values } from 'lodash'
47import { DEFAULT_THEME, NSFW_POLICY_TYPES } from '../../initializers/constants' 47import { DEFAULT_THEME_NAME, DEFAULT_USER_THEME_NAME, NSFW_POLICY_TYPES } from '../../initializers/constants'
48import { clearCacheByUserId } from '../../lib/oauth-model' 48import { clearCacheByUserId } from '../../lib/oauth-model'
49import { UserNotificationSettingModel } from './user-notification-setting' 49import { UserNotificationSettingModel } from './user-notification-setting'
50import { VideoModel } from '../video/video' 50import { 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,