Changeset 31fc5c8
- Timestamp:
- 01/08/21 16:32:00 (4 years ago)
- Branches:
- master
- Children:
- 14b648e
- Parents:
- 277b400
- Location:
- src/main/java/it/finki/tinki
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/web/controller/RegisterController.java
r277b400 r31fc5c8 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; 5 7 import it.finki.tinki.model.dto.UserRegisterDTO; 6 8 import it.finki.tinki.service.AccountService; … … 50 52 } 51 53 52 //TODO: ADD TEAM AND COMPANY REGISTER TDO --------------------------------------v 54 @RequestMapping(path = "/team", method = RequestMethod.POST) 55 private Map<String, String> registerTeam(@RequestBody TeamRegisterDTO body){ 53 56 54 @RequestMapping(path = "/team", method = RequestMethod.POST) 55 private Map<String, String> registerTeam(@RequestBody String email, 56 @RequestBody String password, 57 @RequestBody String name, 58 @RequestBody int members){ 59 60 Account k = this.accountService.registerTeam(email, password, name, members); 57 Account k = this.accountService.registerTeam(body.getEmail(), body.getPassword(), body.getName(), body.getMembers()); 61 58 62 59 Map<String, String> response = new HashMap<>(); … … 72 69 73 70 @RequestMapping(path = "/company", method = RequestMethod.POST) 74 private Map<String, String> registeCompany(@RequestBody String email, 75 @RequestBody String password, 76 @RequestBody String name, 77 @RequestBody String country, 78 @RequestBody String city, 79 @RequestBody String street){ 71 private Map<String, String> registeCompany(@RequestBody CompanyRegisterDTO body){ 80 72 81 Account k = this.accountService.registerCompany(email, password, name, country, city, street); 73 Account k = this.accountService.registerCompany(body.getEmail(), 74 body.getPassword(), body.getName(), body.getCountry(), body.getCity(), body.getStreet()); 82 75 83 76 Map<String, String> response = new HashMap<>();
Note:
See TracChangeset
for help on using the changeset viewer.