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/account/account.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/account/account.ts')
-rw-r--r-- | server/models/account/account.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 7cc40f631..6f425024e 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts | |||
@@ -25,9 +25,9 @@ import { getSort, throwIfNotValid } from '../utils' | |||
25 | import { VideoChannelModel } from '../video/video-channel' | 25 | import { VideoChannelModel } from '../video/video-channel' |
26 | import { VideoCommentModel } from '../video/video-comment' | 26 | import { VideoCommentModel } from '../video/video-comment' |
27 | import { UserModel } from './user' | 27 | import { UserModel } from './user' |
28 | import { CONFIG } from '../../initializers' | ||
29 | import { AvatarModel } from '../avatar/avatar' | 28 | import { AvatarModel } from '../avatar/avatar' |
30 | import { VideoPlaylistModel } from '../video/video-playlist' | 29 | import { VideoPlaylistModel } from '../video/video-playlist' |
30 | import { WEBSERVER } from '../../initializers/constants' | ||
31 | 31 | ||
32 | export enum ScopeNames { | 32 | export enum ScopeNames { |
33 | SUMMARY = 'SUMMARY' | 33 | SUMMARY = 'SUMMARY' |
@@ -199,7 +199,7 @@ export class AccountModel extends Model<AccountModel> { | |||
199 | static loadByNameWithHost (nameWithHost: string) { | 199 | static loadByNameWithHost (nameWithHost: string) { |
200 | const [ accountName, host ] = nameWithHost.split('@') | 200 | const [ accountName, host ] = nameWithHost.split('@') |
201 | 201 | ||
202 | if (!host || host === CONFIG.WEBSERVER.HOST) return AccountModel.loadLocalByName(accountName) | 202 | if (!host || host === WEBSERVER.HOST) return AccountModel.loadLocalByName(accountName) |
203 | 203 | ||
204 | return AccountModel.loadByNameAndHost(accountName, host) | 204 | return AccountModel.loadByNameAndHost(accountName, host) |
205 | } | 205 | } |