fix: fix error on deploy
This commit is contained in:
@@ -61,7 +61,7 @@ export class PaymentService {
|
||||
await this.purchaseDataAccess.createPurchase(payment.userId.toString(), payment.courseId.toString(), payment._id.toString());
|
||||
|
||||
payment.paymentStatus = PaymentStatus.Completed;
|
||||
await this.paymentDataAccess.updatePaymentStatus(payment._id, PaymentStatus.Completed);
|
||||
await this.paymentDataAccess.updatePaymentStatus(payment._id.toString(), PaymentStatus.Completed);
|
||||
|
||||
const registerCourse = await this.userDataAccess.registerCourse(payment.userId, payment.courseId);
|
||||
if (!registerCourse.success) {
|
||||
@@ -78,7 +78,7 @@ export class PaymentService {
|
||||
|
||||
await session.commitTransaction();
|
||||
await session.endSession();
|
||||
|
||||
|
||||
return { success: true, payment: payment }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user