Changeset bd46dbb for src/main/java/it/finki/tinki/web/controller
- Timestamp:
- 01/08/21 23:47:41 (4 years ago)
- Branches:
- master
- Children:
- 297bd16
- Parents:
- bd38a55
- Location:
- src/main/java/it/finki/tinki/web/controller
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/web/controller/AccountEditController.java
rbd38a55 rbd46dbb 2 2 3 3 import it.finki.tinki.model.Skill; 4 import it.finki.tinki.model.Users.Account;5 4 import it.finki.tinki.model.Users.Company; 6 5 import it.finki.tinki.model.Users.Team; 7 6 import it.finki.tinki.model.Users.User; 8 import it.finki.tinki.model.dto.*; 7 import it.finki.tinki.model.dto.register.account.CompanyRegisterDTO; 8 import it.finki.tinki.model.dto.register.account.TeamRegisterDTO; 9 import it.finki.tinki.model.dto.register.account.UserRegisterDTO; 10 import it.finki.tinki.model.dto.response.account.CompanyResponseDTO; 11 import it.finki.tinki.model.dto.response.account.TeamResponseDTO; 12 import it.finki.tinki.model.dto.response.account.UserResponseDTO; 9 13 import it.finki.tinki.model.enumerator.AccountType; 10 14 import it.finki.tinki.service.AccountService; 11 15 import it.finki.tinki.service.SkillService; 12 import org.springframework.web.bind.annotation.PathVariable; 13 import org.springframework.web.bind.annotation.RequestBody; 14 import org.springframework.web.bind.annotation.RequestMapping; 15 import org.springframework.web.bind.annotation.RestController; 16 import org.springframework.web.bind.annotation.*; 16 17 17 18 import java.util.List; … … 30 31 } 31 32 32 @ RequestMapping(path = "/user/{id}/{email}")33 @PostMapping(path = "/user/{id}/{email}") 33 34 public UserResponseDTO editUser(@PathVariable(name = "id") Long id, 34 35 @PathVariable(name = "email") String email, … … 48 49 userResponseDTO.setEmail(u.getEmail()); 49 50 userResponseDTO.setType(AccountType.USER); 51 userResponseDTO.setError(null); 50 52 userResponseDTO.setName(u.getName()); 51 53 userResponseDTO.setSurname(u.getSurname()); … … 59 61 } 60 62 61 @ RequestMapping(path = "/company/{id}/{email}")63 @PostMapping(path = "/company/{id}/{email}") 62 64 public CompanyResponseDTO editCompany(@PathVariable(name = "id") Long id, 63 65 @PathVariable(name = "email") String email, … … 73 75 companyResponseDTO.setId(c.getId()); 74 76 companyResponseDTO.setEmail(c.getEmail()); 77 companyResponseDTO.setError(null); 75 78 companyResponseDTO.setType(AccountType.COMPANY); 76 79 companyResponseDTO.setName(c.getName()); … … 83 86 } 84 87 85 @ RequestMapping(path = "/team/{id}/{email}")88 @PostMapping(path = "/team/{id}/{email}") 86 89 public TeamResponseDTO editTeam(@PathVariable(name = "id") Long id, 87 90 @PathVariable(name = "email") String email, … … 97 100 teamResponseDTO.setId(t.getId()); 98 101 teamResponseDTO.setEmail(t.getEmail()); 102 teamResponseDTO.setError(null); 99 103 teamResponseDTO.setType(AccountType.TEAM); 100 104 teamResponseDTO.setName(t.getName()); -
src/main/java/it/finki/tinki/web/controller/LoginController.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.web.controller; 2 2 3 import it.finki.tinki.model. Jobs.Internship;4 import it.finki.tinki.model. Jobs.Job;5 import it.finki.tinki.model. Jobs.Project;3 import it.finki.tinki.model.Work.Internship; 4 import it.finki.tinki.model.Work.Job; 5 import it.finki.tinki.model.Work.Project; 6 6 import it.finki.tinki.model.Users.Account; 7 7 import it.finki.tinki.model.Users.Company; … … 9 9 import it.finki.tinki.model.Users.User; 10 10 import it.finki.tinki.model.dto.*; 11 import it.finki.tinki.model.dto.response.account.LoginResponseDTO; 12 import it.finki.tinki.model.dto.response.account.CompanyResponseDTO; 13 import it.finki.tinki.model.dto.response.account.TeamResponseDTO; 14 import it.finki.tinki.model.dto.response.account.UserResponseDTO; 15 import it.finki.tinki.model.dto.response.work.InternshipResponseDTO; 16 import it.finki.tinki.model.dto.response.work.JobResponseDTO; 17 import it.finki.tinki.model.dto.response.work.ProjectResponseDTO; 11 18 import it.finki.tinki.model.enumerator.AccountType; 12 19 import it.finki.tinki.service.AccountService; -
src/main/java/it/finki/tinki/web/controller/RegisterController.java
rbd38a55 rbd46dbb 3 3 import it.finki.tinki.model.Skill; 4 4 import it.finki.tinki.model.Users.Account; 5 import it.finki.tinki.model.dto. CompanyRegisterDTO;6 import it.finki.tinki.model.dto. TeamRegisterDTO;7 import it.finki.tinki.model.dto. UserRegisterDTO;5 import it.finki.tinki.model.dto.register.account.CompanyRegisterDTO; 6 import it.finki.tinki.model.dto.register.account.TeamRegisterDTO; 7 import it.finki.tinki.model.dto.register.account.UserRegisterDTO; 8 8 import it.finki.tinki.service.AccountService; 9 9 import it.finki.tinki.service.MatchmakerService;
Note:
See TracChangeset
for help on using the changeset viewer.