Made a card homepage.

This commit is contained in:
Jordan Mason
2020-09-28 13:50:01 -04:00
parent c009b61b44
commit da99a9ac79
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ import java.util.ArrayList;
@Controller @Controller
public class CardController { public class CardController {
@GetMapping({"/card"}) @GetMapping({"/card", "/"})
public String hello(Model model) { public String hello(Model model) {
ArrayList<Card> allCards = (new SQLDriver()).getAllCards(); ArrayList<Card> allCards = (new SQLDriver()).getAllCards();
model.addAttribute("allcards", allCards); model.addAttribute("allcards", allCards);

View File

@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam;
@Controller @Controller
public class HelloController { public class HelloController {
@GetMapping({"/", "/hello"}) @GetMapping({"/hello"})
public String hello(Model model, @RequestParam(value="name", required=false, defaultValue="World") String name) { public String hello(Model model, @RequestParam(value="name", required=false, defaultValue="World") String name) {
model.addAttribute("name", name); model.addAttribute("name", name);
return "hello"; return "hello";