Skip to content

Commit

Permalink
Merge pull request #64 from richard483/fix-1
Browse files Browse the repository at this point in the history
updated update contract access control, order recruiter contract list…
  • Loading branch information
richard483 authored Jan 21, 2024
2 parents bc6d2ad + 547c08a commit e66ad8c
Show file tree
Hide file tree
Showing 5 changed files with 12 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.5",
"version": "4.1.6",
"description": "",
"author": "8tech",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion src/contract/contract.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ContractController {
}

@ApiBearerAuth()
@Roles(Role.RECRUITER)
@Roles(Role.USER)
@UseGuards(JwtAuthGuard, RoleGuard)
@Post('update')
async updateContract(@Res() res, @Body() data: ContractUpdateDto) {
Expand Down
3 changes: 3 additions & 0 deletions src/contract/contract.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ export class ContractRepository {
},
},
},
orderBy: {
updatedAt: 'desc',
},
include: {
payment: true,
jobVacancy: true,
Expand Down
5 changes: 5 additions & 0 deletions src/job/job.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export class JobRepository {
res = await this.prisma.jobVacancy.findUnique({
where: {
id: jobId,
contracts: {
every: {
status: 'PENDING',
},
},
},
include: {
contracts: {
Expand Down

0 comments on commit e66ad8c

Please sign in to comment.