Skip to content

Commit

Permalink
Merge pull request #62 from richard483/fix-1
Browse files Browse the repository at this point in the history
added contractId to applicant list api
  • Loading branch information
richard483 authored Jan 20, 2024
2 parents ce50411 + 599f1ea commit 5823f55
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backend-8tech",
"version": "4.1.3",
"version": "4.1.4",
"description": "",
"author": "8tech",
"private": true,
Expand Down
7 changes: 6 additions & 1 deletion src/job/job.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5823f55

Please sign in to comment.