feat: Implement feature to get all projects from an employee (SCRUM-31) #37

Merged
ptran merged 2 commits from feature/get-projects-from-employee into main 2024-10-23 10:50:49 +00:00
Showing only changes of commit 02d9fda6b7 - Show all commits

@ -14,6 +14,7 @@ import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
@Service @Service
public class EmployeeService { public class EmployeeService {
@ -59,7 +60,7 @@ public class EmployeeService {
} }
} }
public ArrayList<GetProjectDto> getProjects(Long employeeId) { public List<GetProjectDto> getProjects(Long employeeId) {
ArrayList<ProjectEntity> projects = this.projectRepository.findAllByEmployeeId(employeeId); ArrayList<ProjectEntity> projects = this.projectRepository.findAllByEmployeeId(employeeId);
ArrayList<GetProjectDto> projectDtos = new ArrayList<>(); ArrayList<GetProjectDto> projectDtos = new ArrayList<>();