refactor
This commit is contained in:
1 parent
f873174eb2
commit
e7c7ec8deb
4 files changed
+3
-3
No files matched your search
@@ -18,13 +18,13 @@ public class PageController {
|
||||
|
||||
@PostMapping("/list")
|
||||
public String addList(@Valid @ModelAttribute ShoppingList newList){
|
||||
repository.save(newList);
|
||||
shoppingListRepository.save(newList);
|
||||
return "redirect:/";
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@GetMapping("/")
|
||||
public String index(Model model){
|
||||
model.addAttribute("lists", repository.findAll());
|
||||
model.addAttribute("lists", shoppingListRepository.findAll());
|
||||
return "index";
|
||||
}
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user