mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
new recipe bar on home working
This commit is contained in:
@@ -26,8 +26,10 @@ public class SiteController {
|
||||
|
||||
@GetMapping("/")
|
||||
public String viewHomePage(Model model) {
|
||||
List<RecipeDto> recipes = recipeService.getAllRecipes();
|
||||
model.addAttribute("recipes", recipes);
|
||||
List<RecipeDto> recipes = recipeService.getAllRecipes();
|
||||
List<RecipeDto> newest = recipeService.getNewestRecipes(5);
|
||||
model.addAttribute("recipes", recipes);
|
||||
model.addAttribute("newestRecipes", newest);
|
||||
return "home";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user