- Timestamp:
- 01/12/21 02:42:18 (3 years ago)
- Branches:
- master
- Children:
- a70db1a
- Parents:
- 8f1f460
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/web/controller/AccountEditController.java
r8f1f460 r33d4f5d 35 35 } 36 36 37 @PostMapping(path = "/user/{id} ")37 @PostMapping(path = "/user/{id}/{email}") 38 38 public UserResponseDTO editUser(@PathVariable(name = "id") Long id, 39 @PathVariable(name = "email") String email, 39 40 @RequestBody UserRegisterDTO body){ 40 41 41 Optional<?> a = this.accountService.findByIdAndEmail(id, body.getEmail(), AccountType.USER);42 Optional<?> a = this.accountService.findByIdAndEmail(id, email, AccountType.USER); 42 43 43 44 if(a.isPresent()){ … … 51 52 } 52 53 53 @PostMapping(path = "/company/{id} ")54 @PostMapping(path = "/company/{id}/{email}") 54 55 public CompanyResponseDTO editCompany(@PathVariable(name = "id") Long id, 56 @PathVariable(name = "email") String email, 55 57 @RequestBody CompanyRegisterDTO body){ 56 58 57 Optional<?> a = this.accountService.findByIdAndEmail(id, body.getEmail(), AccountType.COMPANY);59 Optional<?> a = this.accountService.findByIdAndEmail(id, email, AccountType.COMPANY); 58 60 59 61 if(a.isPresent()){ … … 65 67 } 66 68 67 @PostMapping(path = "/team/{id} ")69 @PostMapping(path = "/team/{id}/{email}") 68 70 public TeamResponseDTO editTeam(@PathVariable(name = "id") Long id, 71 @PathVariable(name = "email") String email, 69 72 @RequestBody TeamRegisterDTO body){ 70 73 71 Optional<?> a = this.accountService.findByIdAndEmail(id, body.getEmail(), AccountType.TEAM);74 Optional<?> a = this.accountService.findByIdAndEmail(id, email, AccountType.TEAM); 72 75 73 76 if(a.isPresent()){
Note:
See TracChangeset
for help on using the changeset viewer.