Skip to content

Commit

Permalink
adjust login on admin panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Janderson Souza Matias authored and Janderson Souza Matias committed Jan 16, 2024
1 parent 468d642 commit 835baa6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/user/service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export class UserService {
static findUserByEmail = async (email: string): Promise<User | null> => {
const userRepository = dataSource.getRepository(User);

return userRepository.findOne({ where: { email } });
return userRepository.findOne({
where: { email },
relations: { region: { parent: { parent: { parent: true } } } },
});
};

static updateAdmin = async (
Expand Down

0 comments on commit 835baa6

Please sign in to comment.