Completed app page + added metar class

This commit is contained in:
2022-02-18 22:43:01 +00:00
parent ec5ca51602
commit c418188481
5 changed files with 91 additions and 11 deletions

View File

@ -23,18 +23,17 @@ namespace EFB.Controllers
public IActionResult Index()
{
//Check to see what point on the application the user is at and where they should be sent
UserModel User = HttpContext.Session.GetObject<UserModel>("User");
if (User != null)
UserModel user = HttpContext.Session.GetObject<UserModel>("User");
if (user == null)
{
if (User.Route == null)
{
return RedirectToAction("Index", "Route");
}else{
return RedirectToAction("Index", "App");
}
}else{
return RedirectToAction("Index", "Home");
return RedirectToAction("Index", "Home");
}
if (user.Route == null)
{
return RedirectToAction("Index", "Route");
}
return View(user);
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]

View File

@ -185,7 +185,7 @@ namespace EFB.Controllers
user.Cruise = cruise;
HttpContext.Session.SetObject("User", user);
return RedirectToAction("Index", "Route");
return RedirectToAction("Index", "App");
}
TempData["Error"] = $"Unable to get route after {pollCount} Attempts!";