]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/account/account.ts
Add user adminFlags
[github/Chocobozzz/PeerTube.git] / server / models / account / account.ts
index 7cc40f6314c248af55ec6c8b30bea9ca7bf59e35..6f425024e8a5164392032fb647dce67729b6d5d2 100644 (file)
@@ -25,9 +25,9 @@ import { getSort, throwIfNotValid } from '../utils'
 import { VideoChannelModel } from '../video/video-channel'
 import { VideoCommentModel } from '../video/video-comment'
 import { UserModel } from './user'
-import { CONFIG } from '../../initializers'
 import { AvatarModel } from '../avatar/avatar'
 import { VideoPlaylistModel } from '../video/video-playlist'
+import { WEBSERVER } from '../../initializers/constants'
 
 export enum ScopeNames {
   SUMMARY = 'SUMMARY'
@@ -199,7 +199,7 @@ export class AccountModel extends Model<AccountModel> {
   static loadByNameWithHost (nameWithHost: string) {
     const [ accountName, host ] = nameWithHost.split('@')
 
-    if (!host || host === CONFIG.WEBSERVER.HOST) return AccountModel.loadLocalByName(accountName)
+    if (!host || host === WEBSERVER.HOST) return AccountModel.loadLocalByName(accountName)
 
     return AccountModel.loadByNameAndHost(accountName, host)
   }