fix: fix error on deploy

This commit is contained in:
Matin
2025-01-05 00:23:52 +03:30
parent 0595fa2e36
commit 2ef50de32d
+2 -2
View File
@@ -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 }
}