16 lines
454 B
C#
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();
|
||
|
}
|
||
|
}
|