diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-11 11:33:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-11 13:45:39 +0200 |
commit | 6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0 (patch) | |
tree | b47de7efb8c6c611c63a15a971c6125a278f547a /server/models/video/video-channel.ts | |
parent | 2c3abc4fa796555eb7d25f416c4f41ab3e3ad8ca (diff) | |
download | PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.gz PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.zst PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.zip |
Move config in its own file
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r-- | server/models/video/video-channel.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index ca06048d1..1abc23eaa 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts | |||
@@ -8,7 +8,8 @@ import { | |||
8 | Default, | 8 | Default, |
9 | DefaultScope, | 9 | DefaultScope, |
10 | ForeignKey, | 10 | ForeignKey, |
11 | HasMany, IFindOptions, | 11 | HasMany, |
12 | IFindOptions, | ||
12 | Is, | 13 | Is, |
13 | Model, | 14 | Model, |
14 | Scopes, | 15 | Scopes, |
@@ -28,7 +29,7 @@ import { AccountModel, ScopeNames as AccountModelScopeNames } from '../account/a | |||
28 | import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' | 29 | import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' |
29 | import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils' | 30 | import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils' |
30 | import { VideoModel } from './video' | 31 | import { VideoModel } from './video' |
31 | import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers' | 32 | import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers' |
32 | import { ServerModel } from '../server/server' | 33 | import { ServerModel } from '../server/server' |
33 | import { DefineIndexesOptions } from 'sequelize' | 34 | import { DefineIndexesOptions } from 'sequelize' |
34 | import { AvatarModel } from '../avatar/avatar' | 35 | import { AvatarModel } from '../avatar/avatar' |
@@ -419,7 +420,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
419 | static loadByNameWithHostAndPopulateAccount (nameWithHost: string) { | 420 | static loadByNameWithHostAndPopulateAccount (nameWithHost: string) { |
420 | const [ name, host ] = nameWithHost.split('@') | 421 | const [ name, host ] = nameWithHost.split('@') |
421 | 422 | ||
422 | if (!host || host === CONFIG.WEBSERVER.HOST) return VideoChannelModel.loadLocalByNameAndPopulateAccount(name) | 423 | if (!host || host === WEBSERVER.HOST) return VideoChannelModel.loadLocalByNameAndPopulateAccount(name) |
423 | 424 | ||
424 | return VideoChannelModel.loadByNameAndHostAndPopulateAccount(name, host) | 425 | return VideoChannelModel.loadByNameAndHostAndPopulateAccount(name, host) |
425 | } | 426 | } |