using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using EFB.Sessions; using Microsoft.Extensions.Logging; using EFB.Models; using EFB.MongoData; namespace EFB.Controllers { //[Route("[controller]")] public class FlightsimController : Controller { private readonly ILogger _logger; public FlightsimController(ILogger logger) { _logger = logger; } public async Task Index() { //Retrieve and Check current user status UserModel user = HttpContext.Session.GetObject("User"); if(user == null) return RedirectToAction("Index", "Home"); //Retrieve the user's latest sim position and construct it into FlightsimModel SimPositionModel latestPosition = await Mongo.GetLatestData(user.EMail); // RouteModel route = RouteModel.StringToRoute(); return View(); } [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Error() { return View("Error!"); } } }