Changeset 336d09e for src/main/java/it/finki/tinki/web
- Timestamp:
- 01/08/21 03:34:14 (4 years ago)
- Branches:
- master
- Children:
- 4b1c93d
- Parents:
- b31afbd
- Location:
- src/main/java/it/finki/tinki/web/controller
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/web/controller/LoginController.java
rb31afbd r336d09e 13 13 import it.finki.tinki.service.MatchmakerService; 14 14 import it.finki.tinki.service.WorkService; 15 import org.apache.coyote.Response;16 15 import org.springframework.web.bind.annotation.*; 17 16 import org.springframework.web.server.ResponseStatusException; 18 17 19 18 import java.util.List; 20 import java.util.Map;21 19 22 20 @RestController … … 35 33 } 36 34 35 //TODO: ADD JOB/INTERNSHIP RESPONSE TYPE TO COMPANY AND TEAM ---------------------v 36 37 37 @PostMapping(path = "/login") 38 38 public LoginResponseDTO testPage(@RequestBody AccountLoginDTO body) throws ResponseStatusException { 39 40 System.out.println(body);41 39 42 40 Account a1 = accountService.findUser(body.getEmail(), body.getPassword(), body.getType()); … … 89 87 tDto.setEmail(a1.getEmail()); 90 88 tDto.setName(a1.getName()); 91 tDto.setType(AccountType. USER);89 tDto.setType(AccountType.TEAM); 92 90 tDto.setMembers(((Team) a1).getMembers()); 93 91 … … 106 104 cDto.setEmail(a1.getEmail()); 107 105 cDto.setName(a1.getName()); 108 cDto.setType(AccountType. USER);106 cDto.setType(AccountType.COMPANY); 109 107 cDto.setAddress(((Company) a1).getAddress()); 110 108 -
src/main/java/it/finki/tinki/web/controller/RegisterController.java
rb31afbd r336d09e 1 1 package it.finki.tinki.web.controller; 2 2 3 import it.finki.tinki.helper.Matchmaker;4 import it.finki.tinki.model.Jobs.Internship;5 import it.finki.tinki.model.Jobs.Job;6 import it.finki.tinki.model.Jobs.Project;7 3 import it.finki.tinki.model.Skill; 8 4 import it.finki.tinki.model.Users.Account; 9 import it.finki.tinki.model.Users.User;10 5 import it.finki.tinki.model.dto.UserRegisterDTO; 11 6 import it.finki.tinki.service.AccountService; … … 55 50 } 56 51 52 //TODO: ADD TEAM AND COMPANY REGISTER TDO --------------------------------------v 53 57 54 @RequestMapping(path = "/team", method = RequestMethod.POST) 58 55 private Map<String, String> registerTeam(@RequestBody String email,
Note:
See TracChangeset
for help on using the changeset viewer.