using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using UnivateProperties_API.Repository.Timeshare; // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 namespace UnivateProperties_API.Controllers.Timeshare { [Route("api/[controller]")] [ApiController] public class ResortController : ControllerBase { private readonly IResortRepository _Repo; public ResortController(IResortRepository repo) { _Repo = repo; } [HttpGet("{regionCode}")] public IActionResult Get(string regionCode) { return new OkObjectResult(_Repo.GetResortsByRegion(regionCode)); } [HttpGet("GetResortDescription/{code}")] public IActionResult GetResortDescription(string code) { return new OkObjectResult(_Repo.GetResortDescription(code)); } [HttpGet("GetResortImages/{code}")] public IActionResult GetResortImages(string code) { return new OkObjectResult(_Repo.GetResortImages(code)); } [HttpGet("GetResortData/{code}")] public IActionResult GetResortData(string code) { return new OkObjectResult(_Repo.GetResortData(code)); } } }