From 599f1eac16c595073d6e8910f2957f8095cb5ba6 Mon Sep 17 00:00:00 2001 From: richard483 Date: Sat, 20 Jan 2024 22:21:38 +0700 Subject: [PATCH] added contractId to applicant list api --- package-lock.json | 4 ++-- package.json | 2 +- src/job/job.repository.ts | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d37c93b..78613c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "backend-8tech", - "version": "4.1.3", + "version": "4.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "backend-8tech", - "version": "4.1.3", + "version": "4.1.4", "license": "UNLICENSED", "dependencies": { "@nestjs/common": "^9.4.3", diff --git a/package.json b/package.json index ff19440..489e2df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "backend-8tech", - "version": "4.1.3", + "version": "4.1.4", "description": "", "author": "8tech", "private": true, diff --git a/src/job/job.repository.ts b/src/job/job.repository.ts index b8d16d0..42085fb 100644 --- a/src/job/job.repository.ts +++ b/src/job/job.repository.ts @@ -114,7 +114,12 @@ export class JobRepository { throw new HttpException({ prisma: e.message }, HttpStatus.BAD_REQUEST); } - const userList = res?.contracts.map((contract) => contract.user); + const userList = res?.contracts.map((contract) => { + return { + ...contract.user, + contractId: contract.id, + }; + }); const total = res?._count.contracts; return returnablePaginated(userList, total, page, size); }