From 9c2e0dbfa9098675390e00ccb0fa49c51b3c6732 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 19 Jun 2018 14:02:57 +0200 Subject: Update iso639 translations for french and deutch --- server/models/account/user.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/models') diff --git a/server/models/account/user.ts b/server/models/account/user.ts index 56af2f30a..1165285ea 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts @@ -36,6 +36,10 @@ import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' import { values } from 'lodash' import { NSFW_POLICY_TYPES } from '../../initializers' +enum ScopeNames { + WITH_VIDEO_CHANNEL = 'WITH_VIDEO_CHANNEL' +} + @DefaultScope({ include: [ { @@ -45,7 +49,7 @@ import { NSFW_POLICY_TYPES } from '../../initializers' ] }) @Scopes({ - withVideoChannel: { + [ScopeNames.WITH_VIDEO_CHANNEL]: { include: [ { model: () => AccountModel, @@ -199,7 +203,7 @@ export class UserModel extends Model { } } - return UserModel.scope('withVideoChannel').findOne(query) + return UserModel.scope(ScopeNames.WITH_VIDEO_CHANNEL).findOne(query) } static loadByEmail (email: string) { -- cgit v1.2.3