Update backend/src/graphql/resolver/UserResolver.ts

Co-authored-by: Hannes Heine <heine.hannes@gmail.com>
This commit is contained in:
Ulf Gebhardt 2021-11-17 00:10:16 +01:00 committed by GitHub
parent eb06b9a528
commit c9f167d07b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -473,7 +473,8 @@ export class UserResolver {
): Promise<boolean> {
const userRepository = getCustomRepository(UserRepository)
const userEntity = await userRepository.findByPubkeyHex(context.pubKey)
const loginUser = await LoginUser.findOneOrFail({ email: userEntity.email })
const loginUserRepository = getCustomRepository(LoginUserRepository)
const loginUser = await loginUserRepository.findOneOrFail({ email: userEntity.email })
if (username) {
throw new Error('change username currently not supported!')