using Microsoft.AspNetCore.Mvc; using ProRestaurant.Repository.Restaurants; namespace ProRestaurant.Controllers.Restaurants { [Route("api/[controller]")] [ApiController] public class MenuController : ControllerBase { private readonly IMenuRepository repo; public MenuController(IMenuRepository _repo) { repo = _repo; } [HttpGet("{id}")] public IActionResult Get(int id) { return new OkObjectResult(repo.GetMenu(id)); } [HttpGet("GetOptions/{menuId}/{categoryId}")] public IActionResult GetOptions(int menuId, int categoryId) { return new OkObjectResult(repo.GetOptions(menuId, categoryId)); } } }