Skip to content

Commit

Permalink
Merge pull request #25 from SelimHorri/develop
Browse files Browse the repository at this point in the history
add findByDepartmentId api in employee resource
  • Loading branch information
SelimHorri authored Jun 27, 2021
2 parents e88da77 + 994653d commit 4bce56f
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 4bce56f

Please sign in to comment.