diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs b/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs index faaa92c..8ba9f9a 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs +++ b/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs @@ -386,14 +386,22 @@ namespace VeterinaryShowOwnerApp.Controllers return result; } [HttpGet] - public IActionResult ServiceListReport() + public IActionResult PetListReport() { - ViewBag.Services = APIOwner.GetRequest>($"api/pet/getpets?ownerid={APIOwner.Owner.Id}"); + if (APIOwner.Owner == null) + { + return Redirect("~/Home/Enter"); + } + ViewBag.Pets = APIOwner.GetRequest>($"api/pet/getpets?ownerid={APIOwner.Owner.Id}"); return View(); } [HttpGet] public IActionResult Report() { + if (APIOwner.Owner == null) + { + return Redirect("~/Home/Enter"); + } return View(); } }