Skip to content

Commit

Permalink
fixed/delete-project (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexStart2 authored Mar 19, 2024
1 parent 15be93d commit 6c92255
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/projects/projects.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class ProjectsController {
@ApiOkResponse({ description: 'Project deleted' })
@Roles(Role.PROJECT_MANAGER)
@Delete(':projectId')
async deleteProject(@Param('id') id: string) {
async deleteProject(@Param('projectId') id: string) {
return await this.projectsService.deleteProject(id);
}

Expand Down
2 changes: 1 addition & 1 deletion src/projects/projects.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export class ProjectsService {
if (!employee) throw new NotFoundException('Employee not found');

if (!employee.departmentId)
throw new HttpException('Employee should be in a department', 409);
throw new HttpException('Employee should be in a department', 400);

const project = await this.prismaService.project.findUnique({
where: { id: projectId },
Expand Down

0 comments on commit 6c92255

Please sign in to comment.