fix: callback transaction

This commit is contained in:
ilham
2021-12-26 23:01:44 +07:00
parent 342c9902ca
commit aa8764ff2b
5 changed files with 35 additions and 6 deletions

View File

@@ -220,7 +220,12 @@ export class UsersService {
async findExist(id: string) {
try {
return await this.usersRepository.findOneOrFail(id);
return await this.usersRepository.findOneOrFail({
where: {
id: id,
},
relations: ['superior'],
});
} catch (e) {
if (e instanceof EntityNotFoundError) {
throw new HttpException(