METAR-Web-App/Controllers/AppController.cs
2021-09-20 19:51:39 +01:00

28 lines
665 B
C#

using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using METAR_Web_App.Controllers.METAR;
using METAR_Web_App.Models;
namespace METAR_Web_App.Controllers
{
public class AppController : Controller
{
public WeatherService weatherService = new WeatherService();
public async Task<IActionResult> ICAO(string ICAO)
{
if (ICAO != null)
{
WeatherInformation weatherInformation = await weatherService.getInformation(ICAO);
return View(weatherInformation);
}
else
{
return View();
}
}
}
}