Skip to content

Commit

Permalink
fix sms sending voucher bug ( relation not loaded by query, so id is …
Browse files Browse the repository at this point in the history
…null) (#114)
  • Loading branch information
artweb11 authored Dec 20, 2023
1 parent 5258d8d commit 04a6402
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/payer-svc/payer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ export class PayerService {
.leftJoinAndSelect('payer.user', 'user')
.where('user.id = :userId', { userId: authUser.sub })
.getOne(),
this.voucherRepository.findOne({ where: { shortenHash } }),
this.voucherRepository.findOne({
where: { shortenHash },
relations: { transaction: true },
}),
]);
const transaction = await this.transactionRepository.findOne({
where: { id: voucher.transaction.id },
Expand Down

0 comments on commit 04a6402

Please sign in to comment.