mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
Update file SiteController.java
This commit is contained in:
@@ -64,9 +64,10 @@ public class SiteController {
|
||||
}
|
||||
|
||||
@GetMapping("/recipes/{id}")
|
||||
public String viewRecipe(@PathVariable Integer id, Model model) {
|
||||
public String viewRecipe(@PathVariable Integer id, Model model, Principal principal) {
|
||||
RecipeDto recipe = recipeService.getRecipeById(id);
|
||||
model.addAttribute("recipe", recipe);
|
||||
model.addAttribute("guest", principal == null);
|
||||
return "view-recipe";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user