Changeset 3fe36de in Git for src/main/java/com/wediscussmovies/project/web
- Timestamp:
- 02/09/22 03:14:08 (3 years ago)
- Branches:
- main
- Children:
- 967b414
- Parents:
- c02189f
- Location:
- src/main/java/com/wediscussmovies/project/web/controller
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/web/controller/PersonController.java
rc02189f r3fe36de 55 55 //Error handling, could be null!!!!!!!!! 56 56 model.addAttribute("person", person); 57 57 addModelPropertiesForUser(model); 58 58 model.addAttribute("contentTemplate", "personShow"); 59 59 return "template"; -
src/main/java/com/wediscussmovies/project/web/controller/UsersController.java
rc02189f r3fe36de 11 11 import org.springframework.stereotype.Controller; 12 12 import org.springframework.ui.Model; 13 import org.springframework.web.bind.annotation.GetMapping; 14 import org.springframework.web.bind.annotation.PostMapping; 15 import org.springframework.web.bind.annotation.RequestMapping; 16 import org.springframework.web.bind.annotation.RequestParam; 13 import org.springframework.web.bind.annotation.*; 17 14 18 15 import java.util.ArrayList; … … 42 39 return "redirect:/register?error=" + exception.getMessage(); 43 40 } 41 } 42 @GetMapping("/profiles/{id}") 43 public String getProfilePage(@PathVariable Integer id, Model model){ 44 model.addAttribute("user",userService.findById(id)); 45 model.addAttribute("contentTemplate","usersShow"); 46 return "template"; 44 47 } 45 48 @GetMapping("/register")
Note:
See TracChangeset
for help on using the changeset viewer.