diff --git a/WeatherDashboard.Web/Controllers/ApiController.cs b/WeatherDashboard.Web/Controllers/ApiController.cs new file mode 100644 index 0000000..fd015ec --- /dev/null +++ b/WeatherDashboard.Web/Controllers/ApiController.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Mvc; +using WeatherDashboard.Web.Services; + +namespace WeatherDashboard.Web.Controllers +{ + [ApiController] + [Route("api")] + public class ApiController : Controller + { + private readonly IForecastService forecastService; + + public ApiController(IForecastService forecastService) => this.forecastService = forecastService; + + public Task Get() => forecastService.GetWeatherAsync(); + } +} \ No newline at end of file