WeatherDashboard/WeatherDashboard.Web/Controllers/ApiController.cs
2023-03-18 22:27:28 -04:00

16 lines
454 B
C#

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<WeatherSet> Get() => forecastService.GetWeatherAsync();
}
}