fixed 403 for API Controller.

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-01-20 18:36:35 -07:00
parent 30a9411cdd
commit 127753ee86

View File

@@ -6,6 +6,11 @@ namespace CarCareTracker.Controllers
{
public IActionResult Unauthorized()
{
if (!User.IsInRole("CookieAuth"))
{
Response.StatusCode = 403;
return new EmptyResult();
}
return View("401");
}
}