From 2ef50de32d3fb6f72024e6f91eb12e368e46da48 Mon Sep 17 00:00:00 2001 From: Matin Date: Sun, 5 Jan 2025 00:23:52 +0330 Subject: [PATCH] fix: fix error on deploy --- src/application/payment/payment.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/application/payment/payment.service.ts b/src/application/payment/payment.service.ts index 97c38a8..59f41b8 100644 --- a/src/application/payment/payment.service.ts +++ b/src/application/payment/payment.service.ts @@ -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 } }