Skip to content

Commit

Permalink
add findByDepartmentId api in employee resource
Browse files Browse the repository at this point in the history
  • Loading branch information
SelimHorri committed Jun 27, 2021
1 parent 2fa0d23 commit 994653d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ public ResponseEntity<DtoCollection<EmployeeProjectData>> findByEmployeeId(@Path
return new ResponseEntity<>(new DtoCollection<>(this.assignmentService.findByEmployeeId(Integer.parseInt(employeeId))), HttpStatus.OK);
}

@GetMapping(value = {"/data/department/{departmentId}"})
public ResponseEntity<DtoCollection<Employee>> findByDepartmentId(@PathVariable("departmentId") final String departmentId) {
return new ResponseEntity<>(new DtoCollection<>(this.employeeService.findByDepartmentId(Integer.parseInt(departmentId))), HttpStatus.OK);
}



}
Expand Down

0 comments on commit 994653d

Please sign in to comment.