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

@@ -42,7 +42,12 @@ export class ProductHistoryPriceService {
async findById(id: string) {
try {
return await this.productHistoryPriceService.findOneOrFail(id);
return await this.productHistoryPriceService.findOneOrFail({
where: {
id: id,
},
relations: ['product'],
});
} catch (e) {
if (e instanceof EntityNotFoundError) {
throw new HttpException(