package com.recipes.controller;

import com.recipes.configuration.security.Auth;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class HomeController {

    @PreAuthorize(Auth.ROLE_QUEEN)
    @GetMapping("/")
    public String home(final Model model) {
        model.addAttribute("message", "hello");
        return "home";
    }
}
