diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-09 17:48:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-09 17:48:15 +0100 |
commit | 9d8ef212ff46cc1b96dc407a85e7486f185c5179 (patch) | |
tree | 61fd2a1a03f84d5fefc6f257fc358b637c791a24 /server/lib | |
parent | 57a9b61a4aeead74e8800bbfad82ef433313b204 (diff) | |
download | PeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.tar.gz PeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.tar.zst PeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.zip |
Fix broken dep
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/auth/oauth-model.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/auth/oauth-model.ts b/server/lib/auth/oauth-model.ts index 81b6529d8..5d68f44e9 100644 --- a/server/lib/auth/oauth-model.ts +++ b/server/lib/auth/oauth-model.ts | |||
@@ -9,9 +9,9 @@ import { UserAdminFlag } from '@shared/models/users/user-flag.model' | |||
9 | import { UserRole } from '@shared/models/users/user-role' | 9 | import { UserRole } from '@shared/models/users/user-role' |
10 | import { logger } from '../../helpers/logger' | 10 | import { logger } from '../../helpers/logger' |
11 | import { CONFIG } from '../../initializers/config' | 11 | import { CONFIG } from '../../initializers/config' |
12 | import { UserModel } from '../../models/user/user' | ||
13 | import { OAuthClientModel } from '../../models/oauth/oauth-client' | 12 | import { OAuthClientModel } from '../../models/oauth/oauth-client' |
14 | import { OAuthTokenModel } from '../../models/oauth/oauth-token' | 13 | import { OAuthTokenModel } from '../../models/oauth/oauth-token' |
14 | import { UserModel } from '../../models/user/user' | ||
15 | import { createUserAccountAndChannelAndPlaylist } from '../user' | 15 | import { createUserAccountAndChannelAndPlaylist } from '../user' |
16 | import { TokensCache } from './tokens-cache' | 16 | import { TokensCache } from './tokens-cache' |
17 | 17 | ||
@@ -116,6 +116,7 @@ async function getUser (usernameOrEmail?: string, password?: string, bypassLogin | |||
116 | logger.debug('Getting User (username/email: ' + usernameOrEmail + ', password: ******).') | 116 | logger.debug('Getting User (username/email: ' + usernameOrEmail + ', password: ******).') |
117 | 117 | ||
118 | const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail) | 118 | const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail) |
119 | |||
119 | // If we don't find the user, or if the user belongs to a plugin | 120 | // If we don't find the user, or if the user belongs to a plugin |
120 | if (!user || user.pluginAuth !== null || !password) return null | 121 | if (!user || user.pluginAuth !== null || !password) return null |
121 | 122 | ||