- Timestamp:
- 01/08/21 21:27:43 (4 years ago)
- Branches:
- master
- Children:
- bd46dbb
- Parents:
- 14b648e
- Location:
- src/main/java/it/finki/tinki
- Files:
-
- 1 added
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/model/dto/CompanyResponseDTO.java
r14b648e rbd38a55 2 2 3 3 import it.finki.tinki.model.Address; 4 import it.finki.tinki.model.Jobs.Internship;5 import it.finki.tinki.model.Jobs.Job;6 4 import lombok.Data; 7 5 6 import java.util.ArrayList; 8 7 import java.util.List; 9 8 … … 13 12 private List<JobResponseDTO> jobs; 14 13 private List<InternshipResponseDTO> internships; 14 15 public CompanyResponseDTO(){ 16 this.jobs = new ArrayList<>(); 17 this.internships = new ArrayList<>(); 18 } 15 19 } -
src/main/java/it/finki/tinki/model/dto/TeamResponseDTO.java
r14b648e rbd38a55 3 3 import lombok.Data; 4 4 5 import java.util.ArrayList; 5 6 import java.util.List; 6 7 … … 10 11 private List<JobResponseDTO> jobs; 11 12 private List<ProjectResponseDTO> projects; 13 14 public TeamResponseDTO(){ 15 this.jobs = new ArrayList<>(); 16 this.projects = new ArrayList<>(); 17 } 12 18 } -
src/main/java/it/finki/tinki/web/controller/AccountEditController.java
r14b648e rbd38a55 19 19 20 20 @RestController 21 @RequestMapping(path = "/api/edit ")22 public class EditController {21 @RequestMapping(path = "/api/edit/account") 22 public class AccountEditController { 23 23 24 24 AccountService accountService; 25 25 SkillService skillService; 26 26 27 public EditController(AccountService accountService, SkillService skillService) {27 public AccountEditController(AccountService accountService, SkillService skillService) { 28 28 this.accountService = accountService; 29 29 this.skillService = skillService; … … 41 41 List<Skill> toLearn = this.skillService.returnSkillsBasedOnId(body.getSkillsToLearn()); 42 42 43 User u = (User)this.accountService.editUser(id, body.getEmail(), body.getName(), body.getSurname(), retained, toLearn);43 User u = this.accountService.editUser(id, body.getEmail(), body.getName(), body.getSurname(), retained, toLearn); 44 44 45 45 UserResponseDTO userResponseDTO = new UserResponseDTO(); 46 46 47 userResponseDTO.setId(u.getId()); 47 48 userResponseDTO.setEmail(u.getEmail()); 49 userResponseDTO.setType(AccountType.USER); 48 50 userResponseDTO.setName(u.getName()); 49 51 userResponseDTO.setSurname(u.getSurname()); … … 69 71 CompanyResponseDTO companyResponseDTO = new CompanyResponseDTO(); 70 72 73 companyResponseDTO.setId(c.getId()); 71 74 companyResponseDTO.setEmail(c.getEmail()); 75 companyResponseDTO.setType(AccountType.COMPANY); 72 76 companyResponseDTO.setName(c.getName()); 73 77 companyResponseDTO.setAddress(c.getAddress()); … … 91 95 TeamResponseDTO teamResponseDTO = new TeamResponseDTO(); 92 96 97 teamResponseDTO.setId(t.getId()); 93 98 teamResponseDTO.setEmail(t.getEmail()); 99 teamResponseDTO.setType(AccountType.TEAM); 94 100 teamResponseDTO.setName(t.getName()); 95 101 teamResponseDTO.setMembers(t.getMembers());
Note:
See TracChangeset
for help on using the changeset viewer.