Merge branch 'main' of gitlab.com:etc404/software-engineering-project

merge
This commit is contained in:
kaipher7
2026-04-23 16:53:22 -06:00
@@ -30,6 +30,10 @@ public class SiteController {
@GetMapping("/") @GetMapping("/")
public String viewHomePage(Model model, Principal principal) { public String viewHomePage(Model model, Principal principal) {
List<RecipeDto> newest = recipeService.getNewestRecipes(5);
model.addAttribute("recipes", recipes);
model.addAttribute("newestRecipes", newest);
model.addAttribute("guest", principal == null); model.addAttribute("guest", principal == null);
if (principal == null) { if (principal == null) {
@@ -38,7 +42,7 @@ public class SiteController {
model.addAttribute("recipes", userService.getFavoriteRecipesByUsername(principal.getName())); model.addAttribute("recipes", userService.getFavoriteRecipesByUsername(principal.getName()));
} }
return "home"; return "redirect:/explore";
} }
@GetMapping("/login") @GetMapping("/login")