Changeset bd38a55 for src/main/java/it/finki/tinki/web
- Timestamp:
- 01/08/21 21:27:43 (4 years ago)
- Branches:
- master
- Children:
- bd46dbb
- Parents:
- 14b648e
- Location:
- src/main/java/it/finki/tinki/web/controller
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
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.