Ignore:
Timestamp:
01/08/21 02:08:22 (4 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
b24fe9b
Parents:
a8e8545
Message:

added response dto for job response

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/tinki/web/controller/LoginController.java

    ra8e8545 r4cec0a3  
    11package it.finki.tinki.web.controller;
    22
     3import it.finki.tinki.model.Jobs.Internship;
     4import it.finki.tinki.model.Jobs.Job;
    35import it.finki.tinki.model.Users.Account;
    46import it.finki.tinki.model.Users.Company;
     
    1416import org.springframework.web.server.ResponseStatusException;
    1517
     18import java.util.List;
    1619import java.util.Map;
    1720
     
    5457                uDto.setToLearn(((User) a1).getSkillsToLearn());
    5558
    56                 uDto.setInternships(this.matchmakerService.getMatchingInternshipsForUser((User) a1));
    57                 uDto.setJobs(this.matchmakerService.getMatchingJobsForUser((User) a1));
    58                 uDto.setProjects(this.matchmakerService.getMatchingProjectsForUser((User) a1));
     59                List<Job> matchedJobs = this.matchmakerService.getMatchingJobsForUser((User) a1);
     60
     61                matchedJobs.forEach(job -> {
     62                    JobResponseDTO dto = new JobResponseDTO(job);
     63                    uDto.getJobs().add(dto);
     64                });
     65
    5966
    6067                return uDto;
Note: See TracChangeset for help on using the changeset viewer.