From ac12eee276a89ae279b050e993583849e3e83f97 Mon Sep 17 00:00:00 2001 From: richard483 Date: Wed, 24 Jan 2024 02:30:58 +0700 Subject: [PATCH] update contract status when payment paid --- package-lock.json | 4 ++-- package.json | 2 +- src/contract/contract.service.ts | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0692d86..0937284 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "backend-8tech", - "version": "4.2.2", + "version": "4.2.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "backend-8tech", - "version": "4.2.2", + "version": "4.2.3", "license": "UNLICENSED", "dependencies": { "@nestjs/common": "^9.4.3", diff --git a/package.json b/package.json index 02dc094..d797ee6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "backend-8tech", - "version": "4.2.2", + "version": "4.2.3", "description": "", "author": "8tech", "private": true, diff --git a/src/contract/contract.service.ts b/src/contract/contract.service.ts index 0808375..50c64d8 100644 --- a/src/contract/contract.service.ts +++ b/src/contract/contract.service.ts @@ -209,6 +209,9 @@ export class ContractService { HttpStatus.BAD_REQUEST, ); } + await this.contractRepository.update(contract.id, { + status: 'COMPLETED', + }); await this.paymentService.updatePaymentStatus( payment.id, PaymentStatus.PAID,