aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-19 14:02:57 +0200
committerChocobozzz <me@florianbigard.com>2018-06-19 14:02:57 +0200
commit9c2e0dbfa9098675390e00ccb0fa49c51b3c6732 (patch)
treede2b894e0ba439bb012b895cc86d90b892eead7b /server
parent3aa5cea8fec998805e32c0480884906d8e4fd490 (diff)
downloadPeerTube-9c2e0dbfa9098675390e00ccb0fa49c51b3c6732.tar.gz
PeerTube-9c2e0dbfa9098675390e00ccb0fa49c51b3c6732.tar.zst
PeerTube-9c2e0dbfa9098675390e00ccb0fa49c51b3c6732.zip
Update iso639 translations for french and deutch
Diffstat (limited to 'server')
-rw-r--r--server/models/account/user.ts8
1 files changed, 6 insertions, 2 deletions
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'
36import { values } from 'lodash' 36import { values } from 'lodash'
37import { NSFW_POLICY_TYPES } from '../../initializers' 37import { NSFW_POLICY_TYPES } from '../../initializers'
38 38
39enum ScopeNames {
40 WITH_VIDEO_CHANNEL = 'WITH_VIDEO_CHANNEL'
41}
42
39@DefaultScope({ 43@DefaultScope({
40 include: [ 44 include: [
41 { 45 {
@@ -45,7 +49,7 @@ import { NSFW_POLICY_TYPES } from '../../initializers'
45 ] 49 ]
46}) 50})
47@Scopes({ 51@Scopes({
48 withVideoChannel: { 52 [ScopeNames.WITH_VIDEO_CHANNEL]: {
49 include: [ 53 include: [
50 { 54 {
51 model: () => AccountModel, 55 model: () => AccountModel,
@@ -199,7 +203,7 @@ export class UserModel extends Model<UserModel> {
199 } 203 }
200 } 204 }
201 205
202 return UserModel.scope('withVideoChannel').findOne(query) 206 return UserModel.scope(ScopeNames.WITH_VIDEO_CHANNEL).findOne(query)
203 } 207 }
204 208
205 static loadByEmail (email: string) { 209 static loadByEmail (email: string) {